com.caucho.config.reflect
Class BaseType

java.lang.Object
  extended by com.caucho.config.reflect.BaseType
Direct Known Subclasses:
ArrayType, ClassType, ParamType, VarType, WildcardTypeImpl

@Module
public abstract class BaseType
extends java.lang.Object

type matching the web bean


Nested Class Summary
static class BaseType.ClassFill
           
 
Constructor Summary
BaseType()
           
 
Method Summary
static BaseType create(java.lang.reflect.Type type, java.util.HashMap<java.lang.String,BaseType> paramMap, java.lang.String paramDeclName, BaseType.ClassFill classFill)
           
static BaseType create(java.lang.reflect.Type type, java.util.HashMap<java.lang.String,BaseType> paramMap, java.lang.String paramDeclName, java.lang.reflect.Type parentType, BaseType.ClassFill classFill)
           
static BaseType createClass(java.lang.Class<?> type)
          Create a class-based type, where any parameters are filled with the variables, not Object.
static BaseType createForSource(java.lang.reflect.Type type, java.util.HashMap<java.lang.String,BaseType> paramMap, java.lang.String paramDeclName)
           
static BaseType createForTarget(java.lang.reflect.Type type, java.util.HashMap<java.lang.String,BaseType> paramMap, java.lang.String paramDeclName)
           
static BaseType createGenericClass(java.lang.Class<?> type)
          Create a class-based type, where any parameters are filled with the variables, not Object.
 BaseType fill(BaseType... baseType)
          Fills in a parameter with a given name.
 void fillSyntheticTypes(java.util.Set<VarType<?>> varTypeList)
           
protected  void fillTypeClosure(InjectManager manager, java.util.Set<java.lang.reflect.Type> typeSet)
           
 java.util.Set<BaseType> getBaseTypeClosure(InjectManager manager)
          Returns the type closure of the base type.
 BaseType[] getParameters()
           
 java.util.HashMap<java.lang.String,BaseType> getParamMap()
           
abstract  java.lang.Class<?> getRawClass()
           
 java.lang.String getSimpleName()
           
 java.util.Set<java.lang.reflect.Type> getTypeClosure(InjectManager manager)
          Returns the type closure of the base type.
protected  BaseType[] getWildcardBounds()
           
 boolean isAssignableFrom(BaseType type)
           
 boolean isGeneric()
          Returns true for a generic type like MyBean or MyBean
 boolean isGenericRaw()
          Returns true for a raw type like MyBean where the class definition is MyBean.
 boolean isGenericVariable()
          Returns true for a generic variable type like MyBean, but not MyBean
 boolean isObject()
           
 boolean isParamAssignableFrom(BaseType type)
          Assignable as a parameter.
 boolean isPrimitive()
           
 boolean isVariable()
          Returns true for a variable type like X
 boolean isWildcard()
           
 java.lang.String toString()
           
 java.lang.reflect.Type toType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BaseType

public BaseType()
Method Detail

createForTarget

public static BaseType createForTarget(java.lang.reflect.Type type,
                                       java.util.HashMap<java.lang.String,BaseType> paramMap,
                                       java.lang.String paramDeclName)

createForSource

public static BaseType createForSource(java.lang.reflect.Type type,
                                       java.util.HashMap<java.lang.String,BaseType> paramMap,
                                       java.lang.String paramDeclName)

create

public static BaseType create(java.lang.reflect.Type type,
                              java.util.HashMap<java.lang.String,BaseType> paramMap,
                              java.lang.String paramDeclName,
                              BaseType.ClassFill classFill)

create

public static BaseType create(java.lang.reflect.Type type,
                              java.util.HashMap<java.lang.String,BaseType> paramMap,
                              java.lang.String paramDeclName,
                              java.lang.reflect.Type parentType,
                              BaseType.ClassFill classFill)

createClass

public static BaseType createClass(java.lang.Class<?> type)
Create a class-based type, where any parameters are filled with the variables, not Object.


createGenericClass

public static BaseType createGenericClass(java.lang.Class<?> type)
Create a class-based type, where any parameters are filled with the variables, not Object.


getRawClass

public abstract java.lang.Class<?> getRawClass()

getParamMap

public java.util.HashMap<java.lang.String,BaseType> getParamMap()

getParameters

public BaseType[] getParameters()

isWildcard

public boolean isWildcard()

isGeneric

public boolean isGeneric()
Returns true for a generic type like MyBean or MyBean


isGenericVariable

public boolean isGenericVariable()
Returns true for a generic variable type like MyBean, but not MyBean


isVariable

public boolean isVariable()
Returns true for a variable type like X


isGenericRaw

public boolean isGenericRaw()
Returns true for a raw type like MyBean where the class definition is MyBean.


isPrimitive

public boolean isPrimitive()

isObject

public boolean isObject()

getWildcardBounds

protected BaseType[] getWildcardBounds()

isAssignableFrom

public boolean isAssignableFrom(BaseType type)

isParamAssignableFrom

public boolean isParamAssignableFrom(BaseType type)
Assignable as a parameter.


toType

public java.lang.reflect.Type toType()

fill

public BaseType fill(BaseType... baseType)
Fills in a parameter with a given name.


getTypeClosure

public final java.util.Set<java.lang.reflect.Type> getTypeClosure(InjectManager manager)
Returns the type closure of the base type.


getBaseTypeClosure

public final java.util.Set<BaseType> getBaseTypeClosure(InjectManager manager)
Returns the type closure of the base type.


fillTypeClosure

protected void fillTypeClosure(InjectManager manager,
                               java.util.Set<java.lang.reflect.Type> typeSet)

fillSyntheticTypes

public void fillSyntheticTypes(java.util.Set<VarType<?>> varTypeList)

getSimpleName

public java.lang.String getSimpleName()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object