Package daikon.tools.jtb
Class PptNameMatcher
- Object
-
- PptNameMatcher
-
public class PptNameMatcher extends Object
Matches program point names with their corresponding MethodDeclaration's (or ConstructorDeclaration's) in an AST.There are a number of issues in matching, for example, ASTs contain generics, and program point names do not. This implementation handles such issues.
-
-
Constructor Summary
Constructors Constructor Description PptNameMatcher(Node root)
Create an AST matcher that will match program points against AST elements rooted at `root'.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
extractPptArgs(PptName ppt_name)
List<PptTopLevel>
getMatches(PptMap ppts, ConstructorDeclaration constrdecl)
Iterates through program points and returns those that match the given constructor declaration.List<PptTopLevel>
getMatches(PptMap ppts, MethodDeclaration methdecl)
Iterates through program points and returns those that match the given method declaration.String
getUngenerifiedType(FormalParameter p)
boolean
matches(PptName pptName, Node methodOrConstructorDeclaration)
boolean
typeMatch(String pptTypeString, FormalParameter astFormalParameter)
-
-
-
Constructor Detail
-
PptNameMatcher
public PptNameMatcher(Node root)
Create an AST matcher that will match program points against AST elements rooted at `root'.
-
-
Method Detail
-
getUngenerifiedType
public String getUngenerifiedType(FormalParameter p)
-
getMatches
public List<PptTopLevel> getMatches(PptMap ppts, MethodDeclaration methdecl)
Iterates through program points and returns those that match the given method declaration.
-
getMatches
public List<PptTopLevel> getMatches(PptMap ppts, ConstructorDeclaration constrdecl)
Iterates through program points and returns those that match the given constructor declaration.
-
typeMatch
public boolean typeMatch(String pptTypeString, FormalParameter astFormalParameter)
-
extractPptArgs
public List<String> extractPptArgs(PptName ppt_name)
-
-