org.incava.java

Class TypeDeclarationUtil

public class TypeDeclarationUtil extends SimpleNodeUtil

Miscellaneous routines for type declarations.
Method Summary
static ASTTypeDeclarationfindTypeDeclaration(String name, ASTTypeDeclaration[] types)
static SimpleNodegetDeclaration(ASTClassOrInterfaceBodyDeclaration bdecl)
Returns the real declaration, which is a method, field, constructor, or inner class or interface.
static ASTClassOrInterfaceBodyDeclaration[]getDeclarations(ASTTypeDeclaration tdecl)
Returns a list of all methods, fields, constructors, and inner classes and interfaces.
static ASTClassOrInterfaceBodyDeclaration[]getDeclarations(ASTClassOrInterfaceDeclaration coid)
Returns a list of all methods, fields, constructors, and inner classes and interfaces.
static doublegetMatchScore(ASTClassOrInterfaceBodyDeclaration aDecl, ASTClassOrInterfaceBodyDeclaration bDecl)
static TokengetName(ASTTypeDeclaration typeDecl)
static ASTClassOrInterfaceDeclarationgetType(ASTTypeDeclaration typeDecl)
static TreeMapmatchDeclarations(ASTClassOrInterfaceBodyDeclaration[] aDecls, ASTClassOrInterfaceBodyDeclaration[] bDecls)

Method Detail

findTypeDeclaration

public static ASTTypeDeclaration findTypeDeclaration(String name, ASTTypeDeclaration[] types)

getDeclaration

public static SimpleNode getDeclaration(ASTClassOrInterfaceBodyDeclaration bdecl)
Returns the real declaration, which is a method, field, constructor, or inner class or interface.

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.

getMatchScore

public static double getMatchScore(ASTClassOrInterfaceBodyDeclaration aDecl, ASTClassOrInterfaceBodyDeclaration bDecl)

getName

public static Token getName(ASTTypeDeclaration typeDecl)

getType

public static ASTClassOrInterfaceDeclaration getType(ASTTypeDeclaration typeDecl)

matchDeclarations

public static TreeMap matchDeclarations(ASTClassOrInterfaceBodyDeclaration[] aDecls, ASTClassOrInterfaceBodyDeclaration[] bDecls)