public abstract class DefinitionBase extends Object implements IDocumentableDefinition, IDefinitionSet
After definitions are added to the symbol table, they should always be
accessed through the read-only definition interfaces (which are
IDefinition
and its subinterfaces) rather than through these
implementation classes.
Note that this class also implements IDefinitionSet
so that a
scope's map can point to a single definition acting as it own
definition-set-of-size-1.
Modifier and Type | Field and Description |
---|---|
protected static short |
FLAG_CAST_FUNCTION |
protected static short |
FLAG_CONSTRUCTOR |
protected static short |
FLAG_CONTINGENT |
protected static short |
FLAG_DECLARED_IN_CONTROL_FLOW |
protected static short |
FLAG_DEFAULT |
protected static short |
FLAG_DEPRECATED |
protected static short |
FLAG_DYNAMIC |
protected static short |
FLAG_FINAL |
protected static short |
FLAG_GENERATED_EMBED_CLASS |
protected static short |
FLAG_HAS_INIT |
protected static short |
FLAG_IMPLICIT |
protected static short |
FLAG_NATIVE |
protected static short |
FLAG_OVERRIDE |
protected static short |
FLAG_REST |
protected static short |
FLAG_STATIC |
protected short |
flags |
protected NodeReference |
nodeRef |
protected static IMetaTag[] |
singletonEmptyMetaTags |
Constructor and Description |
---|
DefinitionBase(String name)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
addMetaTag(IMetaTag metaTag) |
protected void |
buildInnerString(StringBuilder sb)
Used only for debugging, as part of
toString() . |
void |
buildString(StringBuilder sb,
boolean withLocation)
Used only for debugging, as part of
toString() . |
int |
getAbsoluteEnd()
Gets the absolute ending offset of the entire definition (not just the
name).
|
int |
getAbsoluteStart()
Gets the absolute starting offset of the entire definition (not just the
name).
|
IMetaTag[] |
getAllMetaTags()
Returns all the
IMetaTagNode objects as an array |
IDefinition |
getAncestorOfType(Class<? extends IDefinition> ancestorType)
Gets an ancestor definition of this definition.
|
String |
getArrayElementType(FlexProject project)
Returns the type specified by
[ArrayElementType("...")] |
String |
getBaseName()
Gets the base (i.e., unqualified) name of this definition.
|
List<String> |
getBindableEventNames() |
int |
getColumn()
Gets the local column number of the entire definition (not just the
name).
|
protected ASScope |
getContainingASScope() |
String |
getContainingFilePath()
Gets the file path in which this definition is defined.
|
IASScope |
getContainingScope()
Gets the scope in which this definition exists.
|
String |
getContainingSourceFilePath(ICompilerProject project)
Gets the source file path in which this definition is defined.
|
IDefinition |
getDefinition(int i)
Gets a definition in this set, by index.
|
IDeprecationInfo |
getDeprecationInfo()
Gets the information in the definition's
[Deprecated] metadata. |
int |
getEnd()
Gets the local ending offset of this entire definition (not just the
name).
|
IASDocComment |
getExplicitSourceComment()
Gets the
IASDocComment for the ASDoc comment attached to
this IDocumentableDefinition . |
ASFileScope |
getFileScope() |
IFileSpecification |
getFileSpecification() |
String |
getInstanceType(FlexProject project)
Returns the type specified by
[InstanceType("...")] |
int |
getLine()
Gets the local line number of this entire definition (not just the name).
|
protected String |
getLocationString() |
int |
getMaxSize() |
IMetaTag |
getMetaTagByName(String name)
Returns the first
IMetaTagNode matching the given name |
IMetaTag[] |
getMetaTagsByName(String name)
Gets all the
IMetaTagNode objects that match the given name |
Name |
getMName(ICompilerProject project)
Generate an AET Name object for this definition, and log any Problems
encountered while constructing the Name, to the list of problems passed
in.
|
ModifiersSet |
getModifiers() |
int |
getNameColumn()
Get column number for the name of this definition, if it can be
determined.
|
int |
getNameEnd()
Gets the local ending offset of the name of this definition.
|
int |
getNameLine()
Get line number for the name of this definition, if it can be determined.
|
INamespaceReference |
getNamespaceReference()
Gets the namespace that this definition belongs to.
|
protected String |
getNamespaceReferenceAsString() |
int |
getNameStart()
Gets the local starting offset of the name of this definition.
|
IDefinitionNode |
getNode()
Returns the
IDefinitionNode from which this definition was
created, if the definition came from the AST for a source file. |
String |
getPackageName()
Gets the fully-qualified package name for this definition.
|
IDefinition |
getParent()
Gets the parent definition of this definition.
|
String |
getPercentProxy(FlexProject project)
Returns the property name specified by
[PercentProxy("...")] |
String |
getQualifiedName()
Gets the fully-qualified name of this definition.
|
int |
getSize() |
protected IMetaTag |
getSkinPart() |
String |
getSourcePath()
Gets the local source path of the entire definition (not just the name).
|
int |
getStart()
Gets the local starting offset of the entire definition (not just the
name).
|
protected String |
getStorageName()
Gets the name that is actually stored for this definition.
|
String |
getTypeAsDisplayString()
Converts this definition's type reference to a human-readable String.
|
protected DependencyType |
getTypeDependencyType()
Gets the
DependencyType that should be used when resolving the
type of this definition. |
IReference |
getTypeReference()
Gets a reference to the type of this definition.
|
boolean |
hasCollapseWhiteSpace(FlexProject project)
Returns
true if there is [CollapseWhiteSpace]
metadata on a variable/getter/setter. |
boolean |
hasExplicitComment()
Determines if this node has an explicit comment.
|
boolean |
hasMetaTagByName(String name)
Determines if a specific
IMetaTagNode exists in this collection |
boolean |
hasModifier(ASModifier modifier)
Determines whether the specified modifier is present on this definition.
|
boolean |
hasNamespace(INamespaceReference namespace,
ICompilerProject project)
Determines whether the specified namespace is present on this definition.
|
boolean |
hasRichTextContent(FlexProject project)
Returns
true if there is [RichTextContent]
metadata on a variable/getter/setter. |
protected boolean |
inPackageNamespace()
Determines if this definition is in a package namespaceReference.
|
boolean |
isBindable()
Whether this definition was specified as "Bindable" in its metadata, or
inherits bindability from the containing class
|
boolean |
isBindableStyle() |
boolean |
isColor(FlexProject project)
Returns
true if there is [Inspectable(...)] |
boolean |
isContingent() |
boolean |
isContingentNeeded(ICompilerProject project)
Check if the contingent definition is needed
|
boolean |
isDeprecated()
Checks if this definition is deprecated.
|
boolean |
isDynamic()
Is this definition marked as
dynamic ? |
boolean |
isEmpty()
Determines if this definition set is empty.
|
boolean |
isFinal()
Is this definition marked as
final ? |
boolean |
isGeneratedEmbedClass() |
boolean |
isImplicit()
Is this definition an implicit definition that doesn't actually appear in
the source file?
|
boolean |
isInProject(ICompilerProject project)
Debugging method that can be used to assert that a definition is a specified project.
|
boolean |
isInternal()
Determines whether this definition is in an internal namespace.
|
boolean |
isNative()
Is this definition marked as
native ? |
boolean |
isOverride()
Is this definition marked as
override ? |
boolean |
isPrivate()
Determines whether this definition is in a private namespace.
|
boolean |
isProtected()
Determines whether this definition is in a protected namespace.
|
boolean |
isPublic()
Determines whether this definition is in a public namespace.
|
protected boolean |
isRequiredSkinPart(IMetaTag skinPart) |
boolean |
isStatic()
Is this definition marked as
static ? |
boolean |
isTopLevelDefinition()
Is this definition a toplevel definition
|
boolean |
matches(DefinitionBase node) |
INamespaceDefinition |
resolveNamespace(ICompilerProject project)
Resolves the namespace specified for this definition to its
INamespaceDefinition.
|
protected static TypeDefinitionBase |
resolveType(DefinitionBase context,
IReference typeRef,
ICompilerProject project,
DependencyType dt) |
protected static TypeDefinitionBase |
resolveType(DefinitionBase context,
String typeName,
ICompilerProject project,
DependencyType dt)
Static version of
resolveType() to help sub-classes implement
their overrides of resolveType(String, ICompilerProject, DependencyType) . |
TypeDefinitionBase |
resolveType(ICompilerProject project)
Resolves the type of this definition to an
ITypeDefinition . |
TypeDefinitionBase |
resolveType(IReference typeRef,
ICompilerProject project,
DependencyType dt) |
protected TypeDefinitionBase |
resolveType(String typeName,
ICompilerProject project,
DependencyType dt)
This helper method resolves type references in definitions (i.e., Strings
such as "int", "Sprite", or "flash.events.IEventDispatcher" that are
stored as references to a class or interface) to the definition of the
specified type.
|
void |
setBindable()
Utility to mark a definition as bindable.
|
void |
setContainingScope(IASScope scope) |
protected void |
setContingent()
Marks the definition as contingent.
|
void |
setDynamic() |
void |
setFinal() |
void |
setGeneratedEmbedClass()
Marks a class definition as being auto-generated for an embedded asset
(i.e., one created for a
var with [Embed(...)] |
void |
setImplicit() |
void |
setLocation(IMXMLTagData tag)
Called by
MXMLScopeBuilder when building definitions from
MXMLData . |
void |
setMetaTags(IMetaTag[] newMetaTags) |
void |
setModifier(ASModifier modifier) |
void |
setNameLocation(int absoluteNameStart,
int absoluteNameEnd)
This method is used to set the name location when there is no name node
from which it can be determined.
|
void |
setNamespaceReference(INamespaceReference value) |
void |
setNative() |
void |
setNode(IDefinitionNode node)
Attaches a weak reference to the source node that produced this
definition, and copies over enough source-location information to
re-associate the node if it is garbage-collected.
|
void |
setOverride() |
void |
setPublic() |
void |
setStatic() |
void |
setTypeReference(IReference typeReference)
Sets the type reference for this definition.
|
protected String |
toStorageName(String name) |
String |
toString()
Used only for debugging.
|
void |
unsetOverride() |
boolean |
verify()
Used only in asserts.
|
protected static final short FLAG_CAST_FUNCTION
protected static final short FLAG_CONSTRUCTOR
protected static final short FLAG_DYNAMIC
protected static final short FLAG_FINAL
protected static final short FLAG_IMPLICIT
protected static final short FLAG_NATIVE
protected static final short FLAG_OVERRIDE
protected static final short FLAG_REST
protected static final short FLAG_STATIC
protected static final short FLAG_DEFAULT
protected static final short FLAG_CONTINGENT
protected static final short FLAG_GENERATED_EMBED_CLASS
protected static final short FLAG_HAS_INIT
protected static final short FLAG_DEPRECATED
protected static final short FLAG_DECLARED_IN_CONTROL_FLOW
protected short flags
protected static final IMetaTag[] singletonEmptyMetaTags
protected NodeReference nodeRef
public DefinitionBase(String name)
name
- The "constructor name" of the definition.
This is currently in an inconsistent form; for example,
for the flash.display.Sprite
class definition
constructed from source code it is "Sprite"
but for the same definition constructed from ABC it is
"flash.display.Sprite"
.
The "constructor name" will be converted to a "storage name"
and stored in the storageName
field.public void setLocation(IMXMLTagData tag)
MXMLScopeBuilder
when building definitions from
MXMLData
. Creates a nodeless NodeReference
for this
definition that keeps track of the file and offset for the MXML tag that
produced this definition. Later, after the MXML tree is produced, this
NodeReference
can be used to locate the appropriate tree node.tag
- The MXMLTagData
that is producing this definition.public void setNode(IDefinitionNode node)
node
- The IDefinitionNode
that is producing
this definition.public void setNameLocation(int absoluteNameStart, int absoluteNameEnd)
public IASScope getContainingScope()
IDefinition
getContainingScope
in interface IDefinition
null
if
this definition has not yet been added to a scope.public void setContainingScope(IASScope scope)
public IDefinition getParent()
IDefinition
getParent
in interface IDefinition
null
if there is
no parent.public IDefinition getAncestorOfType(Class<? extends IDefinition> ancestorType)
IDefinition
This method walks up the chain of parent definitions and returns the first one having the specified type.
getAncestorOfType
in interface IDefinition
ancestorType
- A Class specifying the desired type of ancestor.protected final String getStorageName()
This is not a public API, and is not in the IDefinition
interface, because different types of definitions store different
types of names. However, the storage name of a definition does
not depend on whether it came from source code or from ABC.
For class, interface, function, variable, constant, and namespace
definitions -- whose base name and the qualified name can differ
when the definition is at package scope -- the storage name is the
base name (e.g., "Sprite"
,
not "flash.display.Sprite"
).
In the case of vector types, the storage name is a base name
like "Vector.<Sprite>"
(not "Vector.<flash.display.Sprite>"
),
which is considered a base name despite technically having a dot.
For parameter definitions -- which cannot be at package scope -
and for event, style, and effect definitions -- which as metadata
don't live in any scope -- there is no distinction between the base
name and the qualified name; the storage name is the same as both
of these. E.g., i
for a parameter definition or
"click"
for an event definition.
For package definitions, the storage name is the package name
(e.g., "flash.display"
), which is considered
both the base name and the qualified name of a package definition.
Finally, for definition promises, the storage name is a dotted,
fully-qualified name (e.g., "flash.display.Sprite"
,
not "Sprite"
).
public IFileSpecification getFileSpecification()
public String getSourcePath()
IDefinition
getSourcePath
in interface IDefinition
String for the path.
public int getStart()
IDefinition
getStart
in interface IDefinition
int
for the offset.public int getEnd()
IDefinition
getEnd
in interface IDefinition
int
for the offset.public int getLine()
IDefinition
getLine
in interface IDefinition
int
for the line number.public int getColumn()
IDefinition
getColumn
in interface IDefinition
int
for the column number.public int getAbsoluteStart()
IDefinition
getAbsoluteStart
in interface IDefinition
int
for the offset.public int getAbsoluteEnd()
IDefinition
getAbsoluteEnd
in interface IDefinition
int
for the offset.public int getNameStart()
IDefinition
getNameStart
in interface IDefinition
int
for the offset.public int getNameEnd()
IDefinition
getNameEnd
in interface IDefinition
int
for the offset.public int getNameLine()
getNameLine
in interface IDefinition
public int getNameColumn()
getNameColumn
in interface IDefinition
public String getContainingFilePath()
IDefinition
getContainingFilePath
in interface IDefinition
public String getContainingSourceFilePath(ICompilerProject project)
IDefinition
For definitions from a source file (like *.as), the result is the same as
IDefinition.getContainingFilePath()
.
If the definition is from a SWC library, and the library source path was set, the result is the file path in the source directory. If the source path was not set, the result is null.
getContainingSourceFilePath
in interface IDefinition
project
- the containing projectpublic String getPackageName()
IDefinition
For example, the backage name of the class definition
for the class flash.display.Sprite
is "flash.display"
getPackageName
in interface IDefinition
public String getBaseName()
IDefinition
For example, the base name of the class definition
for the class flash.display.Sprite
is "Sprite"
.
getBaseName
in interface IDefinition
public String getQualifiedName()
IDefinition
For example, the fully-qualified name of the class definition
for the class flash.display.Sprite
is
"flash.display.Sprite"
.
getQualifiedName
in interface IDefinition
public boolean isTopLevelDefinition()
public boolean isDynamic()
IDefinition
dynamic
?isDynamic
in interface IDefinition
true
if the definition is dynamic
.public void setDynamic()
public boolean isFinal()
IDefinition
final
?isFinal
in interface IDefinition
true
if the definition is final
.public void setFinal()
public boolean isNative()
IDefinition
native
?isNative
in interface IDefinition
true
if the definition is native
.public void setNative()
public boolean isOverride()
IDefinition
override
?isOverride
in interface IDefinition
true
if the definition is override
.public void setOverride()
public void unsetOverride()
public boolean isStatic()
IDefinition
static
?isStatic
in interface IDefinition
true
if the definition is static
.public void setStatic()
public boolean hasModifier(ASModifier modifier)
IDefinition
ASModifier
for the list of modifiers.hasModifier
in interface IDefinition
true
if the modifier is present.public ModifiersSet getModifiers()
getModifiers
in interface IDefinition
public void setModifier(ASModifier modifier)
public boolean isPublic()
IDefinition
isPublic
in interface IDefinition
true
if it is.public boolean isPrivate()
IDefinition
isPrivate
in interface IDefinition
true
if it is.public boolean isProtected()
IDefinition
isProtected
in interface IDefinition
true
if it is.public boolean isInternal()
IDefinition
isInternal
in interface IDefinition
true
if it is.public boolean hasNamespace(INamespaceReference namespace, ICompilerProject project)
IDefinition
Namespaces include public
, private
,
protected
, and internal
, plus any custom
namespaces available in the definition's scope.
The namespace is specified by an INamespaceReference, which can represent
not only a custom namespace like ns1
but also
ns1::ns2
, (ns1::ns2)::ns3
, etc.
hasNamespace
in interface IDefinition
namespace
- An INamespaceReference specifying the namespace to check
for.true
if the namespace is present.public INamespaceReference getNamespaceReference()
IDefinition
getNamespaceReference
in interface IDefinition
== NamespaceDefinition.getPublic()
,
instanceof IPublicNamespaceDefinition
,
instanceof IProtectedNamespaceDefinition
, or For a custom
namespace, the INamespaceReference will represent an expression of the
form ns1
, ns1::ns2
,
(ns1::ns2)::ns3
, etc.public void setNamespaceReference(INamespaceReference value)
public void setPublic()
public void setBindable()
public INamespaceDefinition resolveNamespace(ICompilerProject project)
IDefinition
null
.resolveNamespace
in interface IDefinition
INamespaceDefinition
or null
.public String getTypeAsDisplayString()
IDefinition
If the definition does not have a type reference, this method returns the empty string.
This method should only be used for displaying types in problems, and not for making semantic decisions.
getTypeAsDisplayString
in interface IDefinition
IReference.getDisplayString()
()
on the IReference
returned by IDefinition.getTypeReference()
().public IReference getTypeReference()
IDefinition
For a constant, variable, parameter, getter, or setter definition,
the type reference is determined by the type annotation.
For example, for a variable declaration like var i:int
,
the type reference is a reference to the int
class.
(For a setter, the relevant type annotation is on the parameter,
not the return type, which is supposed to be void
.)
If the type annotation is missing, the reference is null
.
For a function definition, the type reference is always
to the Function
class. You must use the
getReturnTypeReference()
method of
FunctionDefinition
to get the function's return type.
For a rest parameter, the type reference is always
to the Array
class.
For a package, class, or interface definition,
the type reference is null
.
For style and event definitions, the type reference
is determined by the type
attribute in the metadata.
getTypeReference
in interface IDefinition
IReference
to a class or interface.public void setTypeReference(IReference typeReference)
typeReference
- An [@Link IReference} to a class or interface.protected DependencyType getTypeDependencyType()
DependencyType
that should be used when resolving the
type of this definition.
This method is intended to be overridden by sub-classes.
DependencyType
that should be used when resolving the
type of this variable definitionpublic TypeDefinitionBase resolveType(ICompilerProject project)
IDefinition
ITypeDefinition
.resolveType
in interface IDefinition
project
- The ICompilerProject
within which references are
to be resolved.ITypeDefinition
or null
public boolean isImplicit()
IDefinition
this
, super
,
default constructors, and cast functions.isImplicit
in interface IDefinition
public void setImplicit()
public IMetaTag[] getAllMetaTags()
IDefinition
IMetaTagNode
objects as an arraygetAllMetaTags
in interface IDefinition
protected void addMetaTag(IMetaTag metaTag)
public void setMetaTags(IMetaTag[] newMetaTags)
public IMetaTag[] getMetaTagsByName(String name)
IDefinition
IMetaTagNode
objects that match the given namegetMetaTagsByName
in interface IDefinition
name
- the name to match, such as Event, Style, IconFile, etcIMetaTagNode
objects, or empty array (never
null)public boolean hasMetaTagByName(String name)
IDefinition
IMetaTagNode
exists in this collectionhasMetaTagByName
in interface IDefinition
name
- the name of the tagpublic IMetaTag getMetaTagByName(String name)
IDefinition
IMetaTagNode
matching the given namegetMetaTagByName
in interface IDefinition
name
- the name to search forIMetaTagNode
or nullpublic IASDocComment getExplicitSourceComment()
IDocumentableDefinition
IASDocComment
for the ASDoc comment attached to
this IDocumentableDefinition
.getExplicitSourceComment
in interface IDocumentableDefinition
IASDocComment
for the ASDoc comment attached to
this IDocumentableDefinition
.public boolean hasExplicitComment()
IDocumentableDefinition
hasExplicitComment
in interface IDocumentableDefinition
public ASFileScope getFileScope()
public IDefinitionNode getNode()
IDefinition
IDefinitionNode
from which this definition was
created, if the definition came from the AST for a source file.
This method may require the AST to be reloaded or regenerated and therefore may be slow.
More specific definition interfaces such as IClassDefinition
redeclare this method to return a more specific node interface such as
IClassNode
.
getNode
in interface IDefinition
protected static TypeDefinitionBase resolveType(DefinitionBase context, String typeName, ICompilerProject project, DependencyType dt)
resolveType()
to help sub-classes implement
their overrides of resolveType(String, ICompilerProject, DependencyType)
.context
- DefinitionBase
relative to which the resolve should
be done.protected static TypeDefinitionBase resolveType(DefinitionBase context, IReference typeRef, ICompilerProject project, DependencyType dt)
protected TypeDefinitionBase resolveType(String typeName, ICompilerProject project, DependencyType dt)
It is called by
resolveType()
in DefinitionBase to resolve a type
annotation such as the "int" on a declaration like
public var foo:int
;resolveReturnType()
in FunctionDefinition to resolve the
return type of a function declaration;resolveBaseClass()
in ClassDefinition to resolve
extends
clause of a class declaration;resolveImplementedInterfaces()
in ClassDefinition to
resolve the implements
clause of a class declaration;resolveTypeParameters()
in ParameterizedClassDefinition
to resolve the type of a Vector;resolveExtendedInterfaces()
in InterfaceDefinition to
resolve the extends
clause of an interface declaration.typeName
- The name of the type to resolve.project
- The compiler project.dt
- The type of dependency to be created.public TypeDefinitionBase resolveType(IReference typeRef, ICompilerProject project, DependencyType dt)
protected String getLocationString()
public Name getMName(ICompilerProject project)
project
- the Project to use when resolving the Definitions
Namespaceprotected final ASScope getContainingASScope()
protected String getNamespaceReferenceAsString()
public boolean matches(DefinitionBase node)
public boolean isBindable()
isBindable
in interface IDefinition
public List<String> getBindableEventNames()
getBindableEventNames
in interface IDefinition
public boolean isBindableStyle()
isBindableStyle
in interface IDefinition
public boolean isContingent()
isContingent
in interface IDefinition
protected void setContingent()
public boolean isGeneratedEmbedClass()
isGeneratedEmbedClass
in interface IDefinition
true
if this definition is for an auto-generated
embed class (i.e., one created for a var
with
[Embed(...)]
metadata).public void setGeneratedEmbedClass()
var
with [Embed(...)]
metadata).
Adding such a class to the project scope in the middle of a compilation
will not cause the validImports
set to be rebuilt.
public boolean isContingentNeeded(ICompilerProject project)
IDefinition
isContingentNeeded
in interface IDefinition
protected IMetaTag getSkinPart()
protected boolean isRequiredSkinPart(IMetaTag skinPart)
public String getArrayElementType(FlexProject project)
[ArrayElementType("...")]
metadata on a variable/getter/setter of type Array. This method is
in DefinitionBase because it is common to VariableDefinition,
GetterDefinition, and SetterDefinition.public String getInstanceType(FlexProject project)
[InstanceType("...")]
metadata
on a variable/getter/setter of type mx.core.IDeferredInstance.
This method is in DefinitionBase because it is common to VariableDefinition, GetterDefinition, and SetterDefinition.
public String getPercentProxy(FlexProject project)
[PercentProxy("...")]
metadata on a variable/getter/setter. This method is in
DefinitionBase because it is common to VariableDefinition,
GetterDefinition, and SetterDefinition.public boolean hasRichTextContent(FlexProject project)
true
if there is [RichTextContent]
metadata on a variable/getter/setter.
This method is in DefinitionBase because it is common to VariableDefinition, GetterDefinition, and SetterDefinition.
public boolean hasCollapseWhiteSpace(FlexProject project)
true
if there is [CollapseWhiteSpace]
metadata on a variable/getter/setter.
This method is in DefinitionBase because it is common to VariableDefinition, GetterDefinition, and SetterDefinition.
public boolean isColor(FlexProject project)
true
if there is [Inspectable(...)]
metadata on a vairable/getter/setter that specifies
format="Color"
.
This method is in DefinitionBase because it is common to VariableDefinition, GetterDefinition, and SetterDefinition.
protected boolean inPackageNamespace()
public boolean isDeprecated()
IDefinition
isDeprecated
in interface IDefinition
true
if it has [Deprecated]
metadata.public IDeprecationInfo getDeprecationInfo()
IDefinition
[Deprecated]
metadata.getDeprecationInfo
in interface IDefinition
IDeprecationInfo
object.public boolean verify()
public void buildString(StringBuilder sb, boolean withLocation)
toString()
.protected void buildInnerString(StringBuilder sb)
toString()
.public boolean isEmpty()
IDefinitionSet
isEmpty
in interface IDefinitionSet
true
if the definition set is empty.public int getSize()
getSize
in interface IDefinitionSet
public int getMaxSize()
getMaxSize
in interface IDefinitionSet
public IDefinition getDefinition(int i)
IDefinitionSet
getDefinition
in interface IDefinitionSet
i
- The index of the definition.IDefinition
for the definition.public boolean isInProject(ICompilerProject project)
IDefinition
isInProject
in interface IDefinition
Copyright © 2016 The Apache Software Foundation. All rights reserved.