public class NameLogic extends Object
Constructor and Description |
---|
NameLogic() |
Modifier and Type | Method and Description |
---|---|
static NameCategory |
classifyReference(com.github.javaparser.ast.Node name,
TypeSolver typeSolver) |
static NameRole |
classifyRole(com.github.javaparser.ast.Node name)
What is the Role of the given name? Does it represent a Declaration or a Reference?
This classification is purely syntactical, i.e., it does not require symbol resolution.
|
static boolean |
isAName(com.github.javaparser.ast.Node node)
Does the Node represent a Name?
Note that while most specific AST classes either always represent names or never represent names
there are exceptions as the FieldAccessExpr
|
static boolean |
isQualifiedName(com.github.javaparser.ast.Node node)
Is the given node a qualified name?
|
static boolean |
isSimpleName(com.github.javaparser.ast.Node node)
Is the given node a non-qualified name?
|
static String |
nameAsString(com.github.javaparser.ast.Node name)
Return the string representation of the name
|
static NameCategory |
syntacticClassificationAccordingToContext(com.github.javaparser.ast.Node name)
See JLS 6.5.1 Syntactic Classification of a Name According to Context.
|
public static boolean isSimpleName(com.github.javaparser.ast.Node node)
IllegalArgumentException
- if the node is not a namepublic static boolean isQualifiedName(com.github.javaparser.ast.Node node)
IllegalArgumentException
- if the node is not a namepublic static boolean isAName(com.github.javaparser.ast.Node node)
public static NameRole classifyRole(com.github.javaparser.ast.Node name)
public static NameCategory classifyReference(com.github.javaparser.ast.Node name, TypeSolver typeSolver)
public static NameCategory syntacticClassificationAccordingToContext(com.github.javaparser.ast.Node name)
public static String nameAsString(com.github.javaparser.ast.Node name)
Copyright © 2007–2018. All rights reserved.