public interface CAstEntity
Modifier and Type | Field and Description |
---|---|
static int |
FIELD_ENTITY
This entity is a field in an object-oriented language.
|
static int |
FILE_ENTITY
This entity is a source file (i.e.
|
static int |
FUNCTION_ENTITY
This entity is a function.
|
static int |
GLOBAL_ENTITY
This entity represents a global varible
|
static int |
MACRO_ENTITY
This entity is a macro.
|
static int |
RULE_ENTITY
This entity represents a rule in a logic language.
|
static int |
SCRIPT_ENTITY
This entity is a program script for a scripting language.
|
static int |
SUB_LANGUAGE_BASE
Languages that introduce new kinds of CAstEntity should use this
number as the base of integers chosen to denote the new entity
types.
|
static int |
TYPE_ENTITY
This entity is a type in an object-oriented language.
|
Modifier and Type | Method and Description |
---|---|
Map<CAstNode,Collection<CAstEntity>> |
getAllScopedEntities()
Some programming language constructs have a lexical structure.
|
Collection<CAstAnnotation> |
getAnnotations()
Returns the set of any annotations this entity may have
|
int |
getArgumentCount()
Some programming language constructs have a specific number of
arguments.
|
CAstNode[] |
getArgumentDefaults()
Some programming language constructs allow arguments to have default
values.
|
String[] |
getArgumentNames()
Some programming language constructs have named arguments.
|
CAstNode |
getAST()
The CAPA AST of this entity.
|
CAstControlFlowMap |
getControlFlow()
The control flow map for the CAPA AST of this entity.
|
int |
getKind()
What kind of entity is this? The answer should be one of the
constants in this file.
|
String |
getName()
Some programming language constructs have names.
|
CAstNodeTypeMap |
getNodeTypeMap()
The map from CAstNodes to types.
|
CAstSourcePositionMap.Position |
getPosition()
The source position of this entity.
|
Collection<CAstQualifier> |
getQualifiers()
Returns an Iterator over the qualifiers of the given entity, if it has
any, e.g., "final", "private".
|
Iterator<CAstEntity> |
getScopedEntities(CAstNode construct)
Some programming language constructs have a lexical structure.
|
String |
getSignature()
Some programming language constructs have signatures, which are like
names but usually have some detail to distinguish the construct from
others with the same name.
|
CAstSourcePositionMap |
getSourceMap()
The map of CAstNodes to source positions for the CAPA AST of this entity.
|
CAstType |
getType()
The CAst type of this entity.
|
static final int FUNCTION_ENTITY
static final int SCRIPT_ENTITY
static final int TYPE_ENTITY
static final int FIELD_ENTITY
static final int FILE_ENTITY
static final int RULE_ENTITY
static final int MACRO_ENTITY
static final int GLOBAL_ENTITY
static final int SUB_LANGUAGE_BASE
int getKind()
String getName()
String getSignature()
String[] getArgumentNames()
CAstNode[] getArgumentDefaults()
int getArgumentCount()
Map<CAstNode,Collection<CAstEntity>> getAllScopedEntities()
Iterator<CAstEntity> getScopedEntities(CAstNode construct)
CAstNode getAST()
CAstControlFlowMap getControlFlow()
CAstSourcePositionMap getSourceMap()
CAstSourcePositionMap.Position getPosition()
CAstNodeTypeMap getNodeTypeMap()
Collection<CAstQualifier> getQualifiers()
CAstType getType()
Collection<CAstAnnotation> getAnnotations()