Class JCollectionType
java.lang.Object
org.exolab.javasource.JType
org.exolab.javasource.JComponentizedType
org.exolab.javasource.JCollectionType
JType sub-class for collections.
- Since:
- 1.0.4
- Version:
- $Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
- Author:
- Werner Guttman
-
Field Summary
Fields inherited from class JType
BOOLEAN, BYTE, CHAR, DOUBLE, FLOAT, INT, LONG, SHORTModifier and TypeFieldDescriptionstatic final JPrimitiveTypeJType for a boolean (Boolean).static final JPrimitiveTypeJType instance for a byte (Byte).static final JPrimitiveTypeJType instance for a char (Char).static final JPrimitiveTypeJType instance for a double (Double).static final JPrimitiveTypeJType instance for a float (Float).static final JPrimitiveTypeJType instance for a int (Integer).static final JPrimitiveTypeJType instance for a long (Long).static final JPrimitiveTypeJType instance for a short (Short). -
Constructor Summary
ConstructorsConstructorDescriptionJCollectionType(String typeName, String instanceName, JType componentType, boolean useJava50) Creates an instance of a collection type, of type 'collectionName'.JCollectionType(String typeName, JType componentType, boolean useJava50) Creates an instance of a collection type, of type 'collectionName'.JCollectionType(String typeName, JType componentType, boolean useJava50, boolean useExtends) Creates an instance of a collection type, of type 'collectionName'. -
Method Summary
Modifier and TypeMethodDescriptionReturns the instance name of this collection type.toString()
Returns the String representation of this JType.Methods inherited from class JComponentizedType
getComponentType, isUseJava50Modifier and TypeMethodDescriptionfinal JTypeReturns the component type.final booleanIndicates whether Java 5.0 is used.Methods inherited from class JType
getLocalName, getName, isArray, isPrimitive, setNameModifier and TypeMethodDescriptionfinal StringReturns the unqualified Java type name (i.e.final StringgetName()Returns the qualified Java type name.final booleanisArray()Returns true if this type represents an Array.final booleanReturns true if this type represents a Java primitive type.protected voidSets the qualified name of this type.
-
Constructor Details
-
JCollectionType
-
JCollectionType
Creates an instance of a collection type, of type 'collectionName'.- Parameters:
typeName- Name of the collection type interface.componentType- Component type.useJava50- True if Java 5.0 should be used.useExtends- True if '? extends' should be emitted for generics (Java 5.0 ff only).
-
JCollectionType
public JCollectionType(String typeName, String instanceName, JType componentType, boolean useJava50) Creates an instance of a collection type, of type 'collectionName'.- Parameters:
typeName- Name of the collection type interface.instanceName- Name of the actual collection type instance.componentType- Component type.useJava50- True if Java 5.0 should be used.
-
-
Method Details
-
getInstanceName
Returns the instance name of this collection type.- Returns:
- The instance name of this collection type.
-
toString
-