|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Represents the interface for strategies used in accumulating
method sets. Typically a client of CMethodSet
will create an anonymous class of type Strategy
that is passed to accumMethodSet for adding some
subset of the methods of the CMethodSet to an
accumulator.
CMethodSet#accumMethodSet(CMethodSet.Strategy,String,CMethodSet)| Field Summary | |
static byte |
DONE_WITH_ACCUM
The bit mask representing that no more checks of the candidate method need to be made against the
accumulator by calls to resultFor(). |
static byte |
IGNORE_CURRENT
The bit mask representing that the candidate
method passed to resultFor() should be
ignored. |
static byte |
REMOVE_ACCUM
The bit mask representing that the accumMethod
method passed to resultFor() should be
removed from the accumulator. |
| Method Summary | |
boolean |
maybeInclude(CMethod candidate,
CClassType[] args)
Indicates whether the given candidate method
should be checked against the methods already in the
accumulator for possible inclusion in the accumulator. |
byte |
resultFor(CMethod candidate,
CMethod accumMethod)
Checks the given candidate method against a
single method in the accumulator and decides whether the
candidate should be added to the accumulator, whether the
method from the accumulator should be removed, and whether
additional checks against the remaining methods in the
accumulator are necessary. |
| Field Detail |
public static final byte IGNORE_CURRENT
candidate
method passed to resultFor() should be
ignored.
resultFor(CMethod,CMethod)public static final byte REMOVE_ACCUM
accumMethod
method passed to resultFor() should be
removed from the accumulator.
resultFor(CMethod,CMethod)public static final byte DONE_WITH_ACCUM
candidate method need to be made against the
accumulator by calls to resultFor().
resultFor(CMethod,CMethod)| Method Detail |
public boolean maybeInclude(CMethod candidate,
CClassType[] args)
throws UnpositionedError
candidate method
should be checked against the methods already in the
accumulator for possible inclusion in the accumulator.
candidate - the candidate method for inclusion in
the accumulator
UnpositionedError - usually the implementer
will want to use CContextType.reportTrouble() for
error reporting to avoid throwing an exception, the exception is
allowed here for flexibility
public byte resultFor(CMethod candidate,
CMethod accumMethod)
throws UnpositionedError
candidate method against a
single method in the accumulator and decides whether the
candidate should be added to the accumulator, whether the
method from the accumulator should be removed, and whether
additional checks against the remaining methods in the
accumulator are necessary.
candidate - the candidate method for inclusion in
the accumulatoraccumMethod - a single method from the accumulator
UnpositionedError - if a problem is detected in the
source code.
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||