Package com.ibm.wala.cast.tree.impl
Class DelegatingEntity
- java.lang.Object
-
- com.ibm.wala.cast.tree.impl.DelegatingEntity
-
- All Implemented Interfaces:
CAstEntity
public class DelegatingEntity extends Object implements CAstEntity
-
-
Field Summary
-
Fields inherited from interface com.ibm.wala.cast.tree.CAstEntity
FIELD_ENTITY, FILE_ENTITY, FUNCTION_ENTITY, GLOBAL_ENTITY, MACRO_ENTITY, RULE_ENTITY, SCRIPT_ENTITY, SUB_LANGUAGE_BASE, TYPE_ENTITY
-
-
Constructor Summary
Constructors Constructor Description DelegatingEntity(CAstEntity base)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 haveint
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.
-
-
-
Constructor Detail
-
DelegatingEntity
public DelegatingEntity(CAstEntity base)
-
-
Method Detail
-
getKind
public int getKind()
Description copied from interface:CAstEntity
What kind of entity is this? The answer should be one of the constants in this file. This has no meaning to the CAPA AST interfaces, but should be meaningful to a given producer and consumer of an entity.- Specified by:
getKind
in interfaceCAstEntity
-
getName
public String getName()
Description copied from interface:CAstEntity
Some programming language constructs have names. This should be it, if appropriate, and null otherwise.- Specified by:
getName
in interfaceCAstEntity
-
getSignature
public String getSignature()
Description copied from interface:CAstEntity
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. Signatures often denote typing information as well, but this is not required. This method should return a signature if appropriate, and null otherwise.- Specified by:
getSignature
in interfaceCAstEntity
-
getArgumentNames
public String[] getArgumentNames()
Description copied from interface:CAstEntity
Some programming language constructs have named arguments. This should be their names, if appropriate. Otherwise, please return an array of size 0, since null can be a pain.- Specified by:
getArgumentNames
in interfaceCAstEntity
-
getArgumentDefaults
public CAstNode[] getArgumentDefaults()
Description copied from interface:CAstEntity
Some programming language constructs allow arguments to have default values. This should be those defaults, one per named argument above. Otherwise, please return an array of size 0, since null can be a pain.- Specified by:
getArgumentDefaults
in interfaceCAstEntity
-
getArgumentCount
public int getArgumentCount()
Description copied from interface:CAstEntity
Some programming language constructs have a specific number of arguments. This should be that number, if appropriate, and 0 otherwise.- Specified by:
getArgumentCount
in interfaceCAstEntity
-
getAllScopedEntities
public Map<CAstNode,Collection<CAstEntity>> getAllScopedEntities()
Description copied from interface:CAstEntity
Some programming language constructs have a lexical structure. This should be those constructs that are directly inside the current one. The result of this method is a map from source construct to the set of entities induced by that construct. Entities induced by no particular construct are mapped by the null key.- Specified by:
getAllScopedEntities
in interfaceCAstEntity
-
getScopedEntities
public Iterator<CAstEntity> getScopedEntities(CAstNode construct)
Description copied from interface:CAstEntity
Some programming language constructs have a lexical structure. This should be those constructs that are directly inside the current one. The result of this method is the scoped entities induced by the construct `construct' (i.e. a node of the AST returned by Enclosed entities not induced by a specific AST node are mapped by the construct 'null'.- Specified by:
getScopedEntities
in interfaceCAstEntity
-
getAST
public CAstNode getAST()
Description copied from interface:CAstEntity
The CAPA AST of this entity.- Specified by:
getAST
in interfaceCAstEntity
-
getControlFlow
public CAstControlFlowMap getControlFlow()
Description copied from interface:CAstEntity
The control flow map for the CAPA AST of this entity.- Specified by:
getControlFlow
in interfaceCAstEntity
-
getSourceMap
public CAstSourcePositionMap getSourceMap()
Description copied from interface:CAstEntity
The map of CAstNodes to source positions for the CAPA AST of this entity.- Specified by:
getSourceMap
in interfaceCAstEntity
-
getPosition
public CAstSourcePositionMap.Position getPosition()
Description copied from interface:CAstEntity
The source position of this entity.- Specified by:
getPosition
in interfaceCAstEntity
-
getNodeTypeMap
public CAstNodeTypeMap getNodeTypeMap()
Description copied from interface:CAstEntity
The map from CAstNodes to types. Valid for nodes that have an explicitly declared type (e.g. local vars).- Specified by:
getNodeTypeMap
in interfaceCAstEntity
-
getQualifiers
public Collection<CAstQualifier> getQualifiers()
Description copied from interface:CAstEntity
Returns an Iterator over the qualifiers of the given entity, if it has any, e.g., "final", "private".- Specified by:
getQualifiers
in interfaceCAstEntity
-
getType
public CAstType getType()
Description copied from interface:CAstEntity
The CAst type of this entity.- Specified by:
getType
in interfaceCAstEntity
-
getAnnotations
public Collection<CAstAnnotation> getAnnotations()
Description copied from interface:CAstEntity
Returns the set of any annotations this entity may have- Specified by:
getAnnotations
in interfaceCAstEntity
-
-