|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectAst
public class Ast
| Constructor Summary | |
|---|---|
Ast()
|
|
| Method Summary | |
|---|---|
static void |
addComment(Node n,
NodeToken comment)
|
static void |
addComment(Node n,
NodeToken comment,
boolean first)
Add the comment to the first regular token in the tree, as a "special token" (comment). |
static NodeToken |
addComment(Node n,
String comment)
|
static NodeToken |
addComment(Node n,
String comment,
boolean first)
|
static void |
addDeclaration(ClassOrInterfaceBody c,
ClassOrInterfaceBodyDeclaration d)
|
static void |
addFirstSpecial(NodeToken n,
NodeToken s)
Adds the comment to the first regular token in the tree, *before* all other special tokens. |
static void |
addImport(CompilationUnit u,
ImportDeclaration i)
|
static void |
addNthSpecial(NodeToken n,
NodeToken s,
int i)
Adds the comment to the first regular token in the tree, before the ith special token. |
static void |
applyVisitorInsertComments(String javafilename,
Node root,
Writer output,
AnnotateVisitor visitor)
|
static void |
applyVisitorReformat(Reader input,
Writer output,
Visitor visitor)
|
static PrimaryExpression |
assignment2primaryexpression(Expression n)
|
static String |
classnameForSourceOutput(Class c)
|
static boolean |
contains(Node n,
String s)
|
static Node |
copy(String type,
Node n)
|
static Node |
create(String type,
Class[] argTypes,
Object[] args,
String stringRep)
|
static Node |
create(String type,
String stringRep)
|
static String |
fieldName(Name n)
|
static String |
fieldName(PrimaryExpression pe)
|
static void |
findLineAndCol(Node n,
NodeToken comment,
boolean first)
Add the comment to the first regular token in the tree. |
static String |
format(Node n)
|
static String |
formatCurrentLine(Node n)
|
static String |
getBody(MethodDeclaration m)
|
static Class |
getClass(Node n)
|
static Class |
getClass(String s)
|
static String |
getClassName(Node d)
|
static String |
getClassNameForType(TypeDeclaration d)
|
static Constructor |
getConstructor(Class c,
ConstructorDeclaration constructordecl)
|
static Constructor |
getConstructor(ConstructorDeclaration constructordecl)
|
static String |
getFullName(MethodDeclaration method)
|
static String |
getFullSignature(MethodDeclaration method)
|
static List<Invariant> |
getInvariants(PptTopLevel ppt,
PptMap ppt_map)
This code is taken from and modified from daikon.PrintInvariants.print_invariants. |
static Method |
getMethod(Class c,
MethodDeclaration methoddecl)
|
static Method |
getMethod(MethodDeclaration methoddecl)
|
static String |
getMethodDeclarator(MethodDeclaration m)
|
static Modifiers |
getModifiers(ClassOrInterfaceDeclaration n)
|
static Modifiers |
getModifiers(MethodDeclaration n)
|
static String |
getName(ConstructorDeclaration m)
|
static String |
getName(FormalParameter p)
|
static String |
getName(MethodDeclaration m)
|
static String |
getPackage(CompilationUnit u)
|
static List<FormalParameter> |
getParameters(ConstructorDeclaration cd)
|
static List<FormalParameter> |
getParameters(MethodDeclaration m)
|
static List<FormalParameter> |
getParametersNoImplicit(ConstructorDeclaration cd)
|
static Node |
getParent(Class type,
Node child)
|
static Enumeration |
getPrimarySuffixes(PrimaryExpression p)
Returns an Enumeration of PrimarySuffix objects (but the static type of the elements is only known to be Node). |
static String |
getReturnType(MethodDeclaration m)
|
static String |
getType(FormalParameter fp)
|
static Set<String> |
getVariableNames(Node expr)
|
static boolean |
isAccessModifier(String s)
|
static boolean |
isArray(Type n)
|
static boolean |
isImplementation(Class c,
MethodDeclaration methdecl)
|
static boolean |
isImplementation(MethodDeclaration methdecl)
|
static boolean |
isInner(ClassOrInterfaceDeclaration n)
|
static boolean |
isInterface(ClassOrInterfaceBody n)
|
static boolean |
isInterface(ClassOrInterfaceDeclaration n)
|
static boolean |
isMain(MethodDeclaration md)
Return true if this is the main method for this class. |
static boolean |
isOverride(Class c,
MethodDeclaration methdecl)
|
static boolean |
isOverride(MethodDeclaration methdecl)
|
static boolean |
isPrimitive(Type n)
|
static boolean |
isReference(Type n)
|
static boolean |
isStatic(ClassOrInterfaceDeclaration n)
|
static boolean |
isStatic(MethodDeclaration n)
|
static boolean |
modifierPresent(Modifiers modifiers,
String modifierString)
|
static NodeToken |
nodeTokenAfter(Node n)
|
static boolean |
paramsMatch(Class[] params,
List<FormalParameter> ast_params)
|
static String |
print(Node n)
Deprecated. Use format(Node) instead |
static String |
printCurrentLine(Node n)
Deprecated. Use formatCurrentLine(Node) instead |
static String |
quickFixForInternalComment(String s)
|
static void |
removeAnnotations(MethodDeclaration m)
|
static String |
removeWhitespace(String arg)
|
static void |
setAccess(MethodDeclaration m,
String access)
|
static void |
setBody(MethodDeclaration m,
String body)
|
static void |
setName(MethodDeclaration m,
String name)
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Ast()
| Method Detail |
|---|
public static void applyVisitorInsertComments(String javafilename,
Node root,
Writer output,
AnnotateVisitor visitor)
public static void applyVisitorReformat(Reader input,
Writer output,
Visitor visitor)
public static String format(Node n)
public static String quickFixForInternalComment(String s)
public static String formatCurrentLine(Node n)
@Deprecated public static String print(Node n)
@Deprecated public static String printCurrentLine(Node n)
public static Node create(String type,
String stringRep)
public static Node create(String type,
Class[] argTypes,
Object[] args,
String stringRep)
public static boolean isAccessModifier(String s)
public static String getName(FormalParameter p)
public static String getType(FormalParameter fp)
public static String getName(MethodDeclaration m)
public static String getName(ConstructorDeclaration m)
public static String getPackage(CompilationUnit u)
public static String getFullName(MethodDeclaration method)
public static String getFullSignature(MethodDeclaration method)
public static String getClassNameForType(TypeDeclaration d)
public static String getClassName(Node d)
public static void setName(MethodDeclaration m,
String name)
public static PrimaryExpression assignment2primaryexpression(Expression n)
public static String fieldName(PrimaryExpression pe)
public static String fieldName(Name n)
public static NodeToken addComment(Node n,
String comment)
public static NodeToken addComment(Node n,
String comment,
boolean first)
public static void addComment(Node n,
NodeToken comment)
public static void addComment(Node n,
NodeToken comment,
boolean first)
public static void findLineAndCol(Node n,
NodeToken comment,
boolean first)
public static void addNthSpecial(NodeToken n,
NodeToken s,
int i)
public static void addFirstSpecial(NodeToken n,
NodeToken s)
public static NodeToken nodeTokenAfter(Node n)
public static void removeAnnotations(MethodDeclaration m)
public static String removeWhitespace(String arg)
public static Class getClass(Node n)
public static Class getClass(String s)
public static Method getMethod(MethodDeclaration methoddecl)
public static Method getMethod(Class c,
MethodDeclaration methoddecl)
public static Constructor getConstructor(ConstructorDeclaration constructordecl)
public static Constructor getConstructor(Class c,
ConstructorDeclaration constructordecl)
public static boolean paramsMatch(Class[] params,
List<FormalParameter> ast_params)
public static boolean isOverride(MethodDeclaration methdecl)
public static boolean isOverride(Class c,
MethodDeclaration methdecl)
public static boolean isImplementation(MethodDeclaration methdecl)
public static boolean isImplementation(Class c,
MethodDeclaration methdecl)
public static Node getParent(Class type,
Node child)
public static void addDeclaration(ClassOrInterfaceBody c,
ClassOrInterfaceBodyDeclaration d)
public static void setAccess(MethodDeclaration m,
String access)
public static Node copy(String type,
Node n)
public static boolean contains(Node n,
String s)
public static void setBody(MethodDeclaration m,
String body)
public static String getBody(MethodDeclaration m)
public static String getReturnType(MethodDeclaration m)
public static String getMethodDeclarator(MethodDeclaration m)
public static List<FormalParameter> getParameters(MethodDeclaration m)
public static List<FormalParameter> getParametersNoImplicit(ConstructorDeclaration cd)
public static List<FormalParameter> getParameters(ConstructorDeclaration cd)
public static void addImport(CompilationUnit u,
ImportDeclaration i)
public static Set<String> getVariableNames(Node expr)
public static Enumeration getPrimarySuffixes(PrimaryExpression p)
public static boolean isMain(MethodDeclaration md)
public static List<Invariant> getInvariants(PptTopLevel ppt,
PptMap ppt_map)
public static boolean isStatic(ClassOrInterfaceDeclaration n)
public static boolean isStatic(MethodDeclaration n)
public static Modifiers getModifiers(ClassOrInterfaceDeclaration n)
public static Modifiers getModifiers(MethodDeclaration n)
public static boolean modifierPresent(Modifiers modifiers,
String modifierString)
public static boolean isInner(ClassOrInterfaceDeclaration n)
public static boolean isInterface(ClassOrInterfaceBody n)
public static boolean isInterface(ClassOrInterfaceDeclaration n)
public static boolean isPrimitive(Type n)
public static boolean isReference(Type n)
public static boolean isArray(Type n)
public static String classnameForSourceOutput(Class c)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||