Top Inners Fields Constructors Methods
org.codehaus.groovy.runtime.metaclass

public Class MetaMethodIndex

extends Object
Class Inheritance
Imports
groovy.lang.MetaMethod, org.codehaus.groovy.reflection.CachedClass, .GeneratedMetaMethod, org.codehaus.groovy.util.FastArray, .SingleKeyHashMap, java.util.Arrays, .NoSuchElementException, .Objects

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static interface
public static class

Field Summary

Modifier and TypeField and Description
protected static final int
protected static final int
public SingleKeyHashMap
protected static final int
protected int
protected MetaMethodIndex.Entry[]
protected transient int

Constructor Summary

AccessConstructor and Description
public
MetaMethodIndex(CachedClass theCachedClass)

Method Summary

Modifier and TypeMethod and Description
public Object
addMethodToList(final Object o, final MetaMethod toIndex)

public void
public void
public void
public void
public void
private void
public void
private void
public void
public void
public void
private void
public void
public void
private void
public void
private void
private static int
public MetaMethodIndex.EntryIterator
public MetaMethodIndex.Header
getHeader(Class<T> cls)

public final MetaMethodIndex.Entry
getMethods(Class<T> cls, String name)

public MetaMethodIndex.Entry
public MetaMethodIndex.Entry[]
public static int
hash(int h)

public void
init(int initCapacity)

public boolean
private static boolean
isMatchingMethod(final MetaMethod method1, final MetaMethod method2)

private static boolean
private static boolean
isOverridden(final MetaMethod inIndex, final MetaMethod toIndex)

TODO

Note

private methods from parent classes are not handled here, but when doing the multi-method connection step, methods of the parent class will be overwritten with methods of a subclass and in that case private methods should be kept.

public void
resize(int newLength)

public int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEFAULT_CAPACITYback to summary
protected static final int DEFAULT_CAPACITY
MAXIMUM_CAPACITYback to summary
protected static final int MAXIMUM_CAPACITY
methodHeadersback to summary
public SingleKeyHashMap methodHeaders
MINIMUM_CAPACITYback to summary
protected static final int MINIMUM_CAPACITY
sizeback to summary
protected int size
tableback to summary
protected MetaMethodIndex.Entry[] table
thresholdback to summary
protected transient int threshold

Constructor Detail

MetaMethodIndexback to summary
public MetaMethodIndex(CachedClass theCachedClass)

Method Detail

addMethodToListback to summary
public Object addMethodToList(final Object o, final MetaMethod toIndex)
clearback to summary
public void clear()
clearCachesback to summary
public void clearCaches()
clearCachesback to summary
public void clearCaches(String name)
copyback to summary
public void copy(Class<T> c, MetaMethodIndex.Header index)
copyback to summary
public void copy(MetaMethodIndex.Header from, MetaMethodIndex.Header to)
copyAllMethodsback to summary
private void copyAllMethods(MetaMethodIndex.Entry from, MetaMethodIndex.Header to)
copyAllMethodsToSuperback to summary
public void copyAllMethodsToSuper(MetaMethodIndex.Header from, MetaMethodIndex.Header to)
copyAllMethodsToSuperback to summary
private void copyAllMethodsToSuper(MetaMethodIndex.Entry from, MetaMethodIndex.Header to)
copyMethodsToSuperback to summary
public void copyMethodsToSuper()
copyNonPrivateMethodsback to summary
public void copyNonPrivateMethods(Class<T> from, Class<T> to)
copyNonPrivateMethodsback to summary
public void copyNonPrivateMethods(MetaMethodIndex.Header from, MetaMethodIndex.Header to)
copyNonPrivateMethodsback to summary
private void copyNonPrivateMethods(MetaMethodIndex.Entry from, MetaMethodIndex.Header to)
copyNonPrivateMethodsDownback to summary
public void copyNonPrivateMethodsDown(Class<T> from, Class<T> to)
copyNonPrivateMethodsFromSuperback to summary
public void copyNonPrivateMethodsFromSuper(MetaMethodIndex.Header from)
copyNonPrivateMethodsFromSuperback to summary
private void copyNonPrivateMethodsFromSuper(MetaMethodIndex.Entry e)
copyNonPrivateNonNewMetaMethodsback to summary
public void copyNonPrivateNonNewMetaMethods(MetaMethodIndex.Header from, MetaMethodIndex.Header to)
copyNonPrivateNonNewMetaMethodsback to summary
private void copyNonPrivateNonNewMetaMethods(MetaMethodIndex.Entry from, MetaMethodIndex.Header to)
findMatchingMethodback to summary
private static int findMatchingMethod(FastArray list, MetaMethod method)
getEntrySetIteratorback to summary
public MetaMethodIndex.EntryIterator getEntrySetIterator()
getHeaderback to summary
public MetaMethodIndex.Header getHeader(Class<T> cls)
getMethodsback to summary
public final MetaMethodIndex.Entry getMethods(Class<T> cls, String name)
getOrPutMethodsback to summary
public MetaMethodIndex.Entry getOrPutMethods(String name, MetaMethodIndex.Header header)
getTableback to summary
public MetaMethodIndex.Entry[] getTable()
hashback to summary
public static int hash(int h)
initback to summary
public void init(int initCapacity)
isEmptyback to summary
public boolean isEmpty()
isMatchingMethodback to summary
private static boolean isMatchingMethod(final MetaMethod method1, final MetaMethod method2)
isNonRealMethodback to summary
private static boolean isNonRealMethod(final MetaMethod method)
isOverriddenback to summary
private static boolean isOverridden(final MetaMethod inIndex, final MetaMethod toIndex)

TODO

Note

private methods from parent classes are not handled here, but when doing the multi-method connection step, methods of the parent class will be overwritten with methods of a subclass and in that case private methods should be kept.

resizeback to summary
public void resize(int newLength)
sizeback to summary
public int size()
org.codehaus.groovy.runtime.metaclass back to summary

public Class MetaMethodIndex.CacheEntry

extends Object
Class Inheritance
  • java.lang.Object
  • org.codehaus.groovy.runtime.metaclass.MetaMethodIndex.CacheEntry

Field Summary

Modifier and TypeField and Description
public final MetaMethod
public final Class<T>[]

Constructor Summary

AccessConstructor and Description
public
CacheEntry(final Class<T>[] params, final MetaMethod method)

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

methodback to summary
public final MetaMethod method
paramsback to summary
public final Class<T>[] params

Constructor Detail

CacheEntryback to summary
public CacheEntry(final Class<T>[] params, final MetaMethod method)
org.codehaus.groovy.runtime.metaclass back to summary

public Class MetaMethodIndex.Entry

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public MetaMethodIndex.CacheEntry
public MetaMethodIndex.CacheEntry
public MetaMethodIndex.CacheEntry
public Class<T>
public int
public Object
public Object
public String
public MetaMethodIndex.Entry
public MetaMethodIndex.Entry
public Object

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

cachedMethodback to summary
public MetaMethodIndex.CacheEntry cachedMethod
cachedMethodForSuperback to summary
public MetaMethodIndex.CacheEntry cachedMethodForSuper
cachedStaticMethodback to summary
public MetaMethodIndex.CacheEntry cachedStaticMethod
clsback to summary
public Class<T> cls
hashback to summary
public int hash
methodsback to summary
public Object methods
methodsForSuperback to summary
public Object methodsForSuper
nameback to summary
public String name
nextClassEntryback to summary
public MetaMethodIndex.Entry nextClassEntry
nextHashEntryback to summary
public MetaMethodIndex.Entry nextHashEntry
staticMethodsback to summary
public Object staticMethods

Constructor Detail

Entryback to summary
public Entry()

Method Detail

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override
org.codehaus.groovy.runtime.metaclass back to summary

public Interface MetaMethodIndex.EntryIterator


Method Summary

Modifier and TypeMethod and Description
public boolean
public MetaMethodIndex.Entry
next()

Method Detail

hasNextback to summary
public boolean hasNext()
nextback to summary
public MetaMethodIndex.Entry next()