org.codehaus.groovy.reflection
Class CachedClass

java.lang.Object
  extended by org.codehaus.groovy.reflection.CachedClass
Direct Known Subclasses:
ArrayCachedClass, BooleanCachedClass, CachedClosureClass, CharacterCachedClass, NumberCachedClass, ObjectCachedClass, StringCachedClass

public class CachedClass
extends java.lang.Object

Author:
Alex.Tkachman

Nested Class Summary
static class CachedClass.CachedMethodComparatorByName
           
static class CachedClass.CachedMethodComparatorWithString
           
 
Field Summary
private  java.lang.Class cachedClass
           
private  LazyReference<CachedClass> cachedSuperClass
           
private  LazyReference<CallSiteClassLoader> callSiteClassLoader
           
 ClassInfo classInfo
           
private  LazyReference<CachedConstructor[]> constructors
           
private  LazyReference<java.util.Set<CachedClass>> declaredInterfaces
           
(package private)  int distance
           
(package private) static MetaMethod[] EMPTY
           
static CachedClass[] EMPTY_ARRAY
           
private  LazyReference<CachedField[]> fields
           
(package private)  int hashCode
           
private  LazyReference<java.util.LinkedList<ClassInfo>> hierarchy
           
private  LazyReference<java.util.Set<CachedClass>> interfaces
           
 boolean isArray
           
 boolean isInterface
           
 boolean isNumber
           
 boolean isPrimitive
           
private  LazyReference<CachedMethod[]> methods
           
 int modifiers
           
 CachedMethod[] mopMethods
           
private static ReferenceBundle softBundle
           
 
Constructor Summary
CachedClass(java.lang.Class klazz, ClassInfo classInfo)
           
 
Method Summary
 void addNewMopMethods(java.util.List arr)
           
private  void addSubclassExpandos(java.util.ArrayList<MetaMethod> arr, MetaClass mc)
           
 void box(BytecodeHelper helper)
           
 java.lang.Object coerceArgument(java.lang.Object argument)
           
 void doCast(BytecodeHelper helper)
           
 CachedClass getCachedClass()
          compatibility method
 CachedClass getCachedSuperClass()
           
 CallSiteClassLoader getCallSiteLoader()
           
 CachedConstructor[] getConstructors()
           
 java.util.Set<CachedClass> getDeclaredInterfaces()
           
 CachedField[] getFields()
           
 java.util.Collection<ClassInfo> getHierarchy()
           
 java.util.Set<CachedClass> getInterfaces()
           
 CachedMethod[] getMethods()
           
 int getModifiers()
           
 java.lang.String getName()
           
 MetaMethod[] getNewMetaMethods()
           
 int getSuperClassDistance()
           
 java.lang.Class getTheClass()
           
 java.lang.String getTypeDescription()
           
 int hashCode()
           
 boolean isAssignableFrom(java.lang.Class argument)
           
 boolean isDirectlyAssignable(java.lang.Object argument)
           
 boolean isInterface()
           
 boolean isPrimitive()
           
 boolean isVoid()
           
 CachedMethod searchMethods(java.lang.String name, CachedClass[] parameterTypes)
           
 void setNewMopMethods(java.util.List arr)
           
 java.lang.String toString()
           
 void unbox(BytecodeHelper helper)
           
private  void updateAddNewMopMethods(java.util.List arr)
           
private  void updateSetNewMopMethods(java.util.List arr)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

cachedClass

private final java.lang.Class cachedClass

classInfo

public ClassInfo classInfo

softBundle

private static ReferenceBundle softBundle

fields

private final LazyReference<CachedField[]> fields

constructors

private LazyReference<CachedConstructor[]> constructors

methods

private LazyReference<CachedMethod[]> methods

cachedSuperClass

private LazyReference<CachedClass> cachedSuperClass

callSiteClassLoader

private final LazyReference<CallSiteClassLoader> callSiteClassLoader

hierarchy

private final LazyReference<java.util.LinkedList<ClassInfo>> hierarchy

EMPTY

static final MetaMethod[] EMPTY

hashCode

int hashCode

mopMethods

public CachedMethod[] mopMethods

EMPTY_ARRAY

public static final CachedClass[] EMPTY_ARRAY

declaredInterfaces

private final LazyReference<java.util.Set<CachedClass>> declaredInterfaces

interfaces

private final LazyReference<java.util.Set<CachedClass>> interfaces

isArray

public final boolean isArray

isPrimitive

public final boolean isPrimitive

modifiers

public final int modifiers

distance

int distance

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 class java.lang.Object

isPrimitive

public boolean isPrimitive()

isVoid

public boolean isVoid()

box

public void box(BytecodeHelper helper)

unbox

public void unbox(BytecodeHelper helper)

isInterface

public boolean isInterface()

doCast

public void doCast(BytecodeHelper helper)

getName

public java.lang.String getName()

getTypeDescription

public java.lang.String getTypeDescription()

getTheClass

public final java.lang.Class getTheClass()

getNewMetaMethods

public MetaMethod[] getNewMetaMethods()

addSubclassExpandos

private void addSubclassExpandos(java.util.ArrayList<MetaMethod> arr,
                                 MetaClass mc)

setNewMopMethods

public void setNewMopMethods(java.util.List arr)

updateSetNewMopMethods

private void updateSetNewMopMethods(java.util.List arr)

addNewMopMethods

public void addNewMopMethods(java.util.List arr)

updateAddNewMopMethods

private void updateAddNewMopMethods(java.util.List 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 class java.lang.Object

getCachedClass

public CachedClass getCachedClass()
compatibility method

Returns:
this


Copyright © ${year} The Codehaus. All Rights Reserved.