Package org.codehaus.groovy.reflection
Class CachedClass
- java.lang.Object
-
- org.codehaus.groovy.reflection.CachedClass
-
- Direct Known Subclasses:
ArrayCachedClass
,BooleanCachedClass
,CachedClosureClass
,CachedSAMClass
,CharacterCachedClass
,NumberCachedClass
,ObjectCachedClass
,StringCachedClass
public class CachedClass extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CachedClass.CachedMethodComparatorByName
static class
CachedClass.CachedMethodComparatorWithString
-
Field Summary
Fields Modifier and Type Field Description ClassInfo
classInfo
static CachedClass[]
EMPTY_ARRAY
boolean
isArray
boolean
isInterface
boolean
isNumber
boolean
isPrimitive
int
modifiers
CachedMethod[]
mopMethods
-
Constructor Summary
Constructors Constructor Description CachedClass(java.lang.Class klazz, ClassInfo classInfo)
-
Method Summary
-
-
-
Field Detail
-
classInfo
public ClassInfo classInfo
-
mopMethods
public CachedMethod[] mopMethods
-
EMPTY_ARRAY
public static final CachedClass[] EMPTY_ARRAY
-
isArray
public final boolean isArray
-
isPrimitive
public final boolean isPrimitive
-
modifiers
public final int modifiers
-
isInterface
public final boolean isInterface
-
isNumber
public final boolean isNumber
-
-
Constructor Detail
-
CachedClass
public CachedClass(java.lang.Class klazz, ClassInfo classInfo)
-
-
Method Detail
-
getCachedSuperClass
public CachedClass getCachedSuperClass()
-
getInterfaces
public java.util.Set<CachedClass> getInterfaces()
-
getDeclaredInterfaces
public java.util.Set<CachedClass> getDeclaredInterfaces()
-
getMethods
public CachedMethod[] getMethods()
-
getFields
public CachedField[] getFields()
-
getConstructors
public CachedConstructor[] getConstructors()
-
searchMethods
public CachedMethod searchMethods(java.lang.String name, CachedClass[] parameterTypes)
-
getModifiers
public int getModifiers()
-
coerceArgument
public java.lang.Object coerceArgument(java.lang.Object argument)
-
getSuperClassDistance
public int getSuperClassDistance()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
isPrimitive
public boolean isPrimitive()
-
isVoid
public boolean isVoid()
-
isInterface
public boolean isInterface()
-
getName
public java.lang.String getName()
-
getTypeDescription
public java.lang.String getTypeDescription()
-
getTheClass
public final java.lang.Class getTheClass()
-
getNewMetaMethods
public MetaMethod[] getNewMetaMethods()
-
setNewMopMethods
public void setNewMopMethods(java.util.List<MetaMethod> arr)
-
addNewMopMethods
public void addNewMopMethods(java.util.List<MetaMethod> arr)
-
isAssignableFrom
public boolean isAssignableFrom(java.lang.Class argument)
-
isDirectlyAssignable
public boolean isDirectlyAssignable(java.lang.Object argument)
-
getCallSiteLoader
public CallSiteClassLoader getCallSiteLoader()
-
getHierarchy
public java.util.Collection<ClassInfo> getHierarchy()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getCachedClass
public CachedClass getCachedClass()
compatibility method- Returns:
- this
-
-