org.incava.java
Class TypeDeclarationUtil
java.lang.Object
org.incava.java.SimpleNodeUtil
org.incava.java.TypeDeclarationUtil
public class TypeDeclarationUtil
- extends SimpleNodeUtil
Miscellaneous routines for type declarations.
Method Summary |
static ASTTypeDeclaration |
findTypeDeclaration(java.lang.String name,
ASTTypeDeclaration[] types)
|
static SimpleNode |
getDeclaration(ASTClassOrInterfaceBodyDeclaration bdecl)
Returns the real declaration, which is a method, field, constructor, or
inner class or interface. |
static ASTClassOrInterfaceBodyDeclaration[] |
getDeclarations(ASTClassOrInterfaceDeclaration coid)
Returns a list of all methods, fields, constructors, and inner classes
and interfaces. |
static ASTClassOrInterfaceBodyDeclaration[] |
getDeclarations(ASTTypeDeclaration tdecl)
Returns a list of all methods, fields, constructors, and inner classes
and interfaces. |
static double |
getMatchScore(ASTClassOrInterfaceBodyDeclaration aDecl,
ASTClassOrInterfaceBodyDeclaration bDecl)
|
static Token |
getName(ASTTypeDeclaration typeDecl)
|
static ASTClassOrInterfaceDeclaration |
getType(ASTTypeDeclaration typeDecl)
|
static java.util.TreeMap |
matchDeclarations(ASTClassOrInterfaceBodyDeclaration[] aDecls,
ASTClassOrInterfaceBodyDeclaration[] bDecls)
|
Methods inherited from class org.incava.java.SimpleNodeUtil |
dump, dump, findChild, findChild, findChildren, findChildren, findToken, getChildren, getChildren, getChildrenSerially, getChildrenSerially, getLeadingToken, getLeadingTokens, getLevel, getLocation, getParent, getTokens, hasChildren, hasLeadingToken, print, print, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TypeDeclarationUtil
public TypeDeclarationUtil()
getName
public static Token getName(ASTTypeDeclaration typeDecl)
getType
public static ASTClassOrInterfaceDeclaration getType(ASTTypeDeclaration typeDecl)
findTypeDeclaration
public static ASTTypeDeclaration findTypeDeclaration(java.lang.String name,
ASTTypeDeclaration[] types)
getDeclarations
public static ASTClassOrInterfaceBodyDeclaration[] getDeclarations(ASTTypeDeclaration tdecl)
- Returns a list of all methods, fields, constructors, and inner classes
and interfaces.
getDeclarations
public static ASTClassOrInterfaceBodyDeclaration[] getDeclarations(ASTClassOrInterfaceDeclaration coid)
- Returns a list of all methods, fields, constructors, and inner classes
and interfaces.
getDeclaration
public static SimpleNode getDeclaration(ASTClassOrInterfaceBodyDeclaration bdecl)
- Returns the real declaration, which is a method, field, constructor, or
inner class or interface.
matchDeclarations
public static java.util.TreeMap matchDeclarations(ASTClassOrInterfaceBodyDeclaration[] aDecls,
ASTClassOrInterfaceBodyDeclaration[] bDecls)
getMatchScore
public static double getMatchScore(ASTClassOrInterfaceBodyDeclaration aDecl,
ASTClassOrInterfaceBodyDeclaration bDecl)