jklustor-all-api-0.0.7-20140619012755 (ChemAxon)


com.chemaxon.apidiscovery
Class InstanceWrapper<T>

Object
  extended by com.chemaxon.apidiscovery.InstanceWrapper<T>
Type Parameters:
T - Type of wrapped instance

@Beta
public class InstanceWrapper<T>
extends Object

Wrapper for Instances.

Note that usually instances actual are immutable (because of being parameter objects or enums). Some of them have associated builder classes.

Please note that this class is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.

Author:
Gabor Imre

Constructor Summary
InstanceWrapper(T t)
          Create a wrapper for an instance
 
Method Summary
 T get()
          Get the actual wrapped instance.
 Optional<ParameterBuilder<T>> getBuilder()
          Get an associated builder for the given instance if exists.
 String getDescription()
          Represented instance description - from its description annotation.
(package private)  Description getDescriptionAnnotation()
          Represented instances description annotation.
 String getName()
          Represented instance name - from its Description annotation.
 String getShortName()
          Represented instance short name - from its Description annotation.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InstanceWrapper

InstanceWrapper(T t)
Create a wrapper for an instance

Parameters:
t - The wrapped instance
Method Detail

get

public T get()
Get the actual wrapped instance.

Please note that instance might be immutable, in this case associated builder should be used.

Returns:
Wrapped instance

getBuilder

public Optional<ParameterBuilder<T>> getBuilder()
Get an associated builder for the given instance if exists.

Returns:
associated builder

getShortName

public String getShortName()
Represented instance short name - from its Description annotation.

Returns:
Short name

getName

public String getName()
Represented instance name - from its Description annotation.

Returns:
Name

getDescription

public String getDescription()
Represented instance description - from its description annotation.

Returns:
Description of the represented instance

getDescriptionAnnotation

Description getDescriptionAnnotation()
Represented instances description annotation.

Returns:
Represented instances description annotation

jklustor-all-api-0.0.7-20140619012755 (ChemAxon)