|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--openjava.ptree.util.ParseTreeVisitor | +--openjava.ptree.util.EvaluationShuttle | +--openjava.ptree.util.ScopeHandler | +--openjava.ptree.util.TypeNameQualifier
The class TypeNameQualifier
is a utility class
to be usede for making a copy of ptree work well without import
statements.
Object
Field Summary | |
private String |
newName
|
Fields inherited from class openjava.ptree.util.ScopeHandler |
|
Fields inherited from class openjava.ptree.util.EvaluationShuttle |
|
Constructor Summary | |
TypeNameQualifier(Environment env)
Constructs a new visitor for parse tree for qualifying each type name appearing there. |
|
TypeNameQualifier(Environment env,
String newClassName)
Constructs a new visitor for parse tree for qualifying each type name appearing there. |
Method Summary | |
private String |
qualify(String org)
|
private TypeName |
qualifyName(TypeName name)
|
private TypeName[] |
qualifyNames(TypeName[] names)
|
void |
visit(ClassDeclaration c)
|
void |
visit(ClassLiteral clit)
This is needed because of a bug. |
void |
visit(ConstructorDeclaration c)
|
void |
visit(MethodDeclaration m)
|
void |
visit(TypeName tname)
|
Methods inherited from class openjava.ptree.util.ScopeHandler |
evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateDown, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, evaluateUp, pop, push, pushClosedEnvironment |
Methods inherited from class openjava.ptree.util.ParseTreeVisitor |
visit, visit, visit, visit, visit, visit, visit, visit, visit |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private String newName
Constructor Detail |
public TypeNameQualifier(Environment env)
env
- environment for qualifying type names.public TypeNameQualifier(Environment env, String newClassName)
env
- environment for qualifying type names.newClassName
- the class name for constructors.
If null
is specified, the name for constructors
will remain as is.Method Detail |
private String qualify(String org)
private TypeName qualifyName(TypeName name)
private TypeName[] qualifyNames(TypeName[] names)
public void visit(ClassDeclaration c) throws ParseTreeException
visit
in class EvaluationShuttle
ParseTreeException
public void visit(ConstructorDeclaration c) throws ParseTreeException
visit
in class EvaluationShuttle
ParseTreeException
public void visit(MethodDeclaration m) throws ParseTreeException
visit
in class EvaluationShuttle
ParseTreeException
public void visit(TypeName tname) throws ParseTreeException
visit
in class EvaluationShuttle
ParseTreeException
public void visit(ClassLiteral clit) throws ParseTreeException
visit
in class EvaluationShuttle
ParseTreeException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |