Package com.github.javaparser.metamodel
Class BaseNodeMetaModel
java.lang.Object
com.github.javaparser.metamodel.BaseNodeMetaModel
- Direct Known Subclasses:
NodeMetaModel
Meta-data about all classes in the AST. These are all Nodes, except NodeList.
-
Constructor Summary
ConstructorsConstructorDescriptionBaseNodeMetaModel(Optional<BaseNodeMetaModel> superNodeMetaModel, Class<? extends Node> type, String name, String packageName, boolean isAbstract, boolean hasWildcard)
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new node of this type.boolean
The name of the field in JavaParserMetaModel for this node meta model.getType()
int
hashCode()
boolean
boolean
boolean
boolean
isInstanceOfMetaModel(BaseNodeMetaModel baseMetaModel)
boolean
toString()
-
Constructor Details
-
BaseNodeMetaModel
-
-
Method Details
-
is
- Returns:
- is this the meta model for this node class?
-
getQualifiedClassName
- Returns:
- package name + class name
-
getSuperNodeMetaModel
- Returns:
- the meta model for the node that this node extends. Note that this is to be used to find properties defined in superclasses of a Node.
-
getDeclaredPropertyMetaModels
- Returns:
- a list of all properties declared directly in this node (not its parent nodes.) These are also available as fields.
-
getDerivedPropertyMetaModels
-
getConstructorParameters
- Returns:
- a list of all properties that describe the parameters to the all-fields (but not "range" and "comment") constructor, in the order of appearance in the constructor parameter list.
-
getAllPropertyMetaModels
- Returns:
- a list of all properties in this node and its parents. Note that a new list is created every time this method is called.
-
isInstanceOfMetaModel
-
getType
- Returns:
- the class for this AST node type.
-
getPackageName
- Returns:
- the package containing this AST node class.
-
isAbstract
public boolean isAbstract()- Returns:
- whether this AST node is abstract.
-
hasWildcard
public boolean hasWildcard()- Returns:
- whether this AST node has a <?> at the end of its type.
-
isRootNode
public boolean isRootNode()- Returns:
- whether this AST node is the root node, meaning that it is the meta model for "Node": "NodeMetaModel".
-
equals
-
hashCode
public int hashCode() -
toString
-
getTypeNameGenerified
- Returns:
- the type name, with generics.
-
getTypeName
- Returns:
- the raw type name, so nothing but the name.
-
getMetaModelFieldName
The name of the field in JavaParserMetaModel for this node meta model. -
construct
Creates a new node of this type.- Parameters:
parameters
- a map of propertyName -> value. This should at least contain a pair for every required property for this node.
-