| java.lang.Object org.netbeans.modules.vmd.api.model.TypeID
TypeID | final public class TypeID (Code) | | This immutable class represents a type of objects/components in the model. Each object/component has it unique type id.
It is similar to "Class.getName ()" in J2SE.
It holds information about kind, string, and dimension. Kind describes whether it is a primitive (any type that is NOT taken
as a component in the model), component (any type that IS taken as a component in the model), or an enum.
The string is any identification string of the type indepentant on kind and dimension.
The dimension is dimension of type similar to arrays in J2SE.
This class could be presented as a String too because it has unique 1-1 mapping with it.
author: David Kaspar |
Inner Class :public enum Kind | |
Constructor Summary | |
public | TypeID(Kind kind, String string) Creates a new instance by specifying kind and string. | public | TypeID(Kind kind, String string, int dimension) Creates a new instance by specifying kind, string, dimension. |
Method Summary | |
public static TypeID | createFrom(String string) Creates a new instance from an encoded string representation of type id. | public boolean | equals(Object o) Returns whether the encoded string representation of this type id equals to the one from the specified typeid. | public TypeID | getArrayType() Returns an array type id of this type id - opposite to "TypeID.getComponentType" method. | public TypeID | getComponentType() Returns a component type id of this type id - similar to "Class.getComponentType ()". | public int | getDimension() Return a type dimension. | public String | getEncoded() Returns encoded string representation of the type id. | public Kind | getKind() Returns a kind. | public String | getString() Returns an identification string. | public int | hashCode() Returns a hash code of the type id. | public String | toString() Returns encoded string representation of this type id. |
TypeID | public TypeID(Kind kind, String string)(Code) | | Creates a new instance by specifying kind and string. Dimension is 0 = no array.
Parameters: kind - the kind Parameters: string - the string |
TypeID | public TypeID(Kind kind, String string, int dimension)(Code) | | Creates a new instance by specifying kind, string, dimension.
Parameters: kind - the kind Parameters: string - the string Parameters: dimension - the dimension (0 = no array, 1 = one-dimensional array, ...) |
createFrom | public static TypeID createFrom(String string)(Code) | | Creates a new instance from an encoded string representation of type id.
Parameters: string - the encoded string |
equals | public boolean equals(Object o)(Code) | | Returns whether the encoded string representation of this type id equals to the one from the specified typeid.
Parameters: o - the compared type id true if equals |
getArrayType | public TypeID getArrayType()(Code) | | Returns an array type id of this type id - opposite to "TypeID.getComponentType" method.
the array type id |
getComponentType | public TypeID getComponentType()(Code) | | Returns a component type id of this type id - similar to "Class.getComponentType ()".
Note: This type id must be an array.
the component type id. |
getDimension | public int getDimension()(Code) | | Return a type dimension.
the dimension |
getEncoded | public String getEncoded()(Code) | | Returns encoded string representation of the type id.
the encoded string |
getKind | public Kind getKind()(Code) | | Returns a kind.
the kind |
getString | public String getString()(Code) | | Returns an identification string.
the string |
hashCode | public int hashCode()(Code) | | Returns a hash code of the type id.
the hash code |
toString | public String toString()(Code) | | Returns encoded string representation of this type id.
the string |
|
|