|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Analysis.Transformation.MethodSplitter.Token
protected abstract static class MethodSplitter.Token
Subclasses of MethodSplitter refer to "versions"
of the underlying method which may be named by creating
static instances of this MethodSplitter.Token
class. The argument to the constructor specifies a default
suffix for the newly-split method's name. Don't forget
to extend MethodSplitter.isValidToken() to
include your new MethodSplitter.Token subclasses.
A typical subclass of MethodSplitter will include
the following code fragment:
public class FooBlah extendsMethodSplitter{ /** Token for the foo-blah version of a method. */ public static final Token FOOBLAH = new Token("fooblah") { /** This ensures that FOOBLAH is a singleton object. */ public Object readResolve() { return FOOBLAH; } }; /** Checks the token types handled by this *MethodSplittersubclass. */ protected boolean isValidToken(Token which) { return which==FOOBLAH || super.isValidToken(which); }; };
| Constructor Summary | |
|---|---|
protected |
MethodSplitter.Token(String suggestedSuffix)
Create a token, specifying the suggested method suffix. |
| Method Summary | |
|---|---|
protected abstract Object |
readResolve()
This method must be overridden to ensure that Tokens
are still singletons after deserialization. |
String |
toString()
Returns a human-readable representation of this token. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected MethodSplitter.Token(String suggestedSuffix)
| Method Detail |
|---|
protected abstract Object readResolve()
Tokens
are still singletons after deserialization. See the template
in the class description above.
public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||