|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsun.reflect.generics.factory.CoreReflectionFactory
public class CoreReflectionFactory
Factory for reflective generic type objects for use by core reflection (java.lang.reflect).
| Method Summary | |
|---|---|
TypeVariable<?> |
findTypeVariable(String name)
Returns the type variable with name name, if such a type variable is declared in the scope used to create this factory. |
static CoreReflectionFactory |
make(GenericDeclaration d,
Scope s)
Factory for this class. |
Type |
makeArrayType(Type componentType)
Returns a (possibly generic) array type. |
Type |
makeBool()
Returns the reflective representation of type boolean. |
Type |
makeByte()
Returns the reflective representation of type byte. |
Type |
makeChar()
Returns the reflective representation of type char. |
Type |
makeDouble()
Returns the reflective representation of type double. |
Type |
makeFloat()
Returns the reflective representation of type float. |
Type |
makeInt()
Returns the reflective representation of type int. |
Type |
makeLong()
Returns the reflective representation of type long. |
Type |
makeNamedType(String name)
|
ParameterizedType |
makeParameterizedType(Type declaration,
Type[] typeArgs,
Type owner)
Return an instance of the ParameterizedType interface that corresponds to a generic type instantiation of the generic declaration declaration with actual type arguments typeArgs. |
Type |
makeShort()
Returns the reflective representation of type short. |
TypeVariable<?> |
makeTypeVariable(String name,
FieldTypeSignature[] bounds)
Returns a new type variable declaration. |
Type |
makeVoid()
Returns the reflective representation of void. |
WildcardType |
makeWildcard(FieldTypeSignature[] ubs,
FieldTypeSignature[] lbs)
Returns a new wildcard type variable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static CoreReflectionFactory make(GenericDeclaration d,
Scope s)
Type variables will be created or lookup as necessary in the scope s.
d - - the generic declaration (class, interface, method or
constructor) that thsi factory servicess - the scope in which the factory will allocate and search for
type variables
public TypeVariable<?> makeTypeVariable(String name,
FieldTypeSignature[] bounds)
GenericsFactory
makeTypeVariable in interface GenericsFactoryname - The name of the type variablebounds - An array of abstract syntax trees representing
the upper bound(s) on the type variable being declared
public WildcardType makeWildcard(FieldTypeSignature[] ubs,
FieldTypeSignature[] lbs)
GenericsFactory
makeWildcard in interface GenericsFactoryubs - An array of abstract syntax trees representing
the upper bound(s) on the type variable being declaredlbs - An array of abstract syntax trees representing
the lower bound(s) on the type variable being declared
public ParameterizedType makeParameterizedType(Type declaration,
Type[] typeArgs,
Type owner)
GenericsFactoryThis method throws a MalformedParameterizedTypeException under the following circumstances: If the type declaration does not represent a generic declaration (i.e., it is not an instance of GenericDeclaration). If the number of actual type arguments (i.e., the size of the array typeArgs) does not correspond to the number of formal type arguments. If any of the actual type arguments is not an instance of the bounds on the corresponding formal.
makeParameterizedType in interface GenericsFactorydeclaration - - the generic type declaration that is to be
instantiatedtypeArgs - - the list of actual type arguments
public TypeVariable<?> findTypeVariable(String name)
GenericsFactory
findTypeVariable in interface GenericsFactoryname - - the name of the type variable to search for
public Type makeNamedType(String name)
makeNamedType in interface GenericsFactorypublic Type makeArrayType(Type componentType)
GenericsFactory
makeArrayType in interface GenericsFactorycomponentType - - the component type of the array
public Type makeByte()
GenericsFactory
makeByte in interface GenericsFactorypublic Type makeBool()
GenericsFactory
makeBool in interface GenericsFactorypublic Type makeShort()
GenericsFactory
makeShort in interface GenericsFactorypublic Type makeChar()
GenericsFactory
makeChar in interface GenericsFactorypublic Type makeInt()
GenericsFactory
makeInt in interface GenericsFactorypublic Type makeLong()
GenericsFactory
makeLong in interface GenericsFactorypublic Type makeFloat()
GenericsFactory
makeFloat in interface GenericsFactorypublic Type makeDouble()
GenericsFactory
makeDouble in interface GenericsFactorypublic Type makeVoid()
GenericsFactory
makeVoid in interface GenericsFactory
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||