|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.mjc.CAbstractMethodSet
org.multijava.mjc.CMethodSet
This class encapsulates a collection of method signatures. It is used to track the type signatures of methods declared in a class and to track the apparent methods of a class as augmented by external methods and as viewed by another compilation unit. It includes facilities for accumulating sets of methods that meet some specified criteria, for example, methods that are specialized by a given method.
CClass,
CAugmentationMap| Nested Class Summary | |
static class |
CMethodSet.MethodArgsPair
|
static interface |
CMethodSet.Strategy
Represents the interface for strategies used in accumulating method sets. |
| Nested classes inherited from class org.multijava.mjc.CAbstractMethodSet |
CAbstractMethodSet.Iterator |
| Field Summary | |
private Set |
methodIdents
A set of the identifiers of methods present in this collection. |
private static int |
MIN_HASH_SIZE
The minimum size of the collection for which a Hashset will be instantiated to track method
identifiers. |
private static TokenReference |
NO_TOKEN
|
| Fields inherited from class org.multijava.mjc.CAbstractMethodSet |
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Constructor Summary | |
CMethodSet()
|
|
CMethodSet(CMethod[] methodArray)
|
|
| Method Summary | |
void |
accumMethodSet(CMethodSet.Strategy actor,
String ident,
CMethodSet accum,
CClassType[] args)
Processes the methods in this set using the given strategy and mutates the accumulator according to the strategy. |
void |
appendAbstractMethodsTo(ArrayList v)
Appends all the abstract methods in this collection to the given list. |
void |
appendAbstractMethodsTo(ArrayList v,
CClassType[] args)
|
void |
appendMethodsTo(ArrayList v)
Appends all the methods in this collection to the given list. |
void |
appendMethodsTo(ArrayList v,
CClassType[] args)
|
void |
buildGenericFunctionInfo(ArrayList accum)
|
MethodInfo[] |
buildMethodInfo()
Generates an array of method info for the methods in this collection. |
static byte |
makeResult(boolean ignoreCurrent,
boolean remove,
boolean done)
Constructs a bit-mask for implementers of the resultFor() method of Strategy. |
String |
toString()
|
| Methods inherited from class org.multijava.mjc.CAbstractMethodSet |
addMethod, contains, getFirst, getMethod, isEmpty, iterator, size |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private static int MIN_HASH_SIZE
Hashset will be instantiated to track method
identifiers.
private Set methodIdents
methodArray is only performed if this set
indicates that the search will be successful. The search is
still needed since many lookup operations will yield sets of
applicable methods. Also note that for small collections this
set is just left as null as it is more efficient in those cases
to just perform the linear search.
private static final TokenReference NO_TOKEN
| Constructor Detail |
public CMethodSet(CMethod[] methodArray)
public CMethodSet()
| Method Detail |
public void accumMethodSet(CMethodSet.Strategy actor,
String ident,
CMethodSet accum,
CClassType[] args)
throws UnpositionedError
actor - the strategy used for selecting methodsident - the identifier of the methods to be selected,
used in an efficiency hack for avoiding a
linear search in cases where such a search is
certain to failaccum - an accumulator for the result, is mutated
UnpositionedError - at the discretion of the
strategy
public static byte makeResult(boolean ignoreCurrent,
boolean remove,
boolean done)
resultFor() method of Strategy.
CMethodSet.Strategy,
CMethodSet.Strategy.resultFor(CMethod,CMethod),
CMethodSet.Strategy.IGNORE_CURRENT,
CMethodSet.Strategy.REMOVE_ACCUM,
CMethodSet.Strategy.DONE_WITH_ACCUMpublic void appendAbstractMethodsTo(ArrayList v)
v - mutated to include the CMethods for all
abstract methods in this collection
public void appendAbstractMethodsTo(ArrayList v,
CClassType[] args)
public void appendMethodsTo(ArrayList v)
v - mutated to include the CMethods for all
methods in this collection
public void appendMethodsTo(ArrayList v,
CClassType[] args)
public String toString()
toString in class CAbstractMethodSetpublic MethodInfo[] buildMethodInfo()
public void buildGenericFunctionInfo(ArrayList accum)
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||