Package org.pipservices3.commons.reflect
Class TypeDescriptor
java.lang.Object
org.pipservices3.commons.reflect.TypeDescriptor
Descriptor that points to specific object type by it's name
and optional library (or module) where this type is defined.
This class has symmetric implementation across all languages supported by Pip.Services toolkit and used to support dynamic data processing.
-
Constructor Summary
ConstructorsConstructorDescriptionTypeDescriptor
(String name, String library) Creates a new instance of the type descriptor and sets its values. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares this descriptor to a value.static TypeDescriptor
fromString
(String value) Parses a string to get descriptor fields and returns them as a Descriptor.Gets the name of the library or module where the object type is defined.getName()
Get the name of the object type.toString()
Gets a string representation of the object.
-
Constructor Details
-
TypeDescriptor
Creates a new instance of the type descriptor and sets its values.- Parameters:
name
- a name of the object type.library
- a library or module where this object type is implemented.
-
-
Method Details
-
getName
Get the name of the object type.- Returns:
- the name of the object type.
-
getLibrary
Gets the name of the library or module where the object type is defined.- Returns:
- the name of the library or module.
-
equals
Compares this descriptor to a value. If the value is also a TypeDescriptor it compares their name and library fields. Otherwise this method returns false. -
toString
Gets a string representation of the object. The result has format name[,library] -
fromString
Parses a string to get descriptor fields and returns them as a Descriptor. The string must have format name[,library]- Parameters:
value
- a string to parse.- Returns:
- a newly created Descriptor.
- Throws:
ConfigException
- if the descriptor string is of a wrong format.- See Also:
-