|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.biojava.utils.bytecode.ParametricType
public class ParametricType
A template type.
Template types are resolved at code-generation type rather than at Instruction generation type. They let you bind the concrete type for opcodes at the last minute, so the same max conditional could be used for all primative types, with the type only being bound at the last moment.
Two ParametricType instances are the same if they are the same object, regardless of their names.
Method Summary | |
---|---|
boolean |
canAccept(CodeClass cc)
|
static ParametricType |
createArrayType(String name)
Create a new ParametricType that claims to resolve to an array type. |
static ParametricType |
createObjectType(String name)
Create a new ParametricType that claims to resolve to an object type. |
static ParametricType |
createPrimitiveType(String name)
Create a new ParametricType that claims to resolve to a primative type. |
static ParametricType |
createType(String name)
Create a new ParametricType that claims nothing. |
static ParametricType |
createType(String name,
CodeClass[] classes)
Create a new ParametricType that claims to be castable to all the classes in a list. |
CodeClass[] |
getClasses()
|
String |
getName()
Get the name of this type. |
boolean |
isArray()
|
boolean |
isObject()
|
boolean |
isPrimitive()
Discover if this type must resolve to a primative. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public static ParametricType createType(String name)
name
- the name given to this type
public static ParametricType createPrimitiveType(String name)
name
- the name given to this type
public static ParametricType createObjectType(String name)
name
- the name given to this type
public static ParametricType createArrayType(String name)
name
- the name given to this type
public static ParametricType createType(String name, CodeClass[] classes)
name
- the name given to this typeclasses
- an array of Class objects that any bound type must be
castable to
public String getName()
public boolean isPrimitive()
It is an error for a parametric type to resolve to a non-primative if this flag is set.
public boolean isObject()
public boolean isArray()
public boolean canAccept(CodeClass cc)
public CodeClass[] getClasses()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |