public final class AmbiguousDefinition extends DefinitionBase implements IDefinition
FLAG_CAST_FUNCTION, FLAG_CONSTRUCTOR, FLAG_CONTINGENT, FLAG_DECLARED_IN_CONTROL_FLOW, FLAG_DEFAULT, FLAG_DEPRECATED, FLAG_DYNAMIC, FLAG_FINAL, FLAG_GENERATED_EMBED_CLASS, FLAG_HAS_INIT, FLAG_IMPLICIT, FLAG_NATIVE, FLAG_OVERRIDE, FLAG_REST, FLAG_STATIC, flags, nodeRef, singletonEmptyMetaTags
Modifier and Type | Method and Description |
---|---|
static AmbiguousDefinition |
get()
Get the AmbiguousDefinition instance - currently there is only 1
AmbiguousDefinition instance, but we may modify that if each
AmbiguousDefinition needs to keep track of it's ambiguous results
|
static boolean |
isAmbiguous(IDefinition d)
Is the definition passed in an AmbiguousDefinition.
|
boolean |
isInProject(ICompilerProject project)
Debugging method that can be used to assert that a definition is a specified project.
|
static IDefinition |
resolveAmbiguities(ICompilerProject project,
List<IDefinition> defs)
Helper method to resolve apparently ambiguous results - there are 2 cases
where we what looks like an ambiguity is not - getter/setter pairs, and
legally re-declared local variables If we have a getter and a setter, we
will end up with 2 resulting definitions, but we don't want to report
them as ambiguous if they are a getter & setter for the same property. in
this case, this method arbitrarily returns the first definition passed in
- this should be ok because getter and setter definitions have methods to
access the other one (resolveCorrespondingAccessor), so callers can use
that to get at the one they want.
|
addMetaTag, buildInnerString, buildString, getAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getArrayElementType, getBaseName, getBindableEventNames, getColumn, getContainingASScope, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDefinition, getDeprecationInfo, getEnd, getExplicitSourceComment, getFileScope, getFileSpecification, getInstanceType, getLine, getLocationString, getMaxSize, getMetaTagByName, getMetaTagsByName, getMName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNamespaceReferenceAsString, getNameStart, getNode, getPackageName, getParent, getPercentProxy, getQualifiedName, getSize, getSkinPart, getSourcePath, getStart, getStorageName, getTypeAsDisplayString, getTypeDependencyType, getTypeReference, hasCollapseWhiteSpace, hasExplicitComment, hasMetaTagByName, hasModifier, hasNamespace, hasRichTextContent, inPackageNamespace, isBindable, isBindableStyle, isColor, isContingent, isContingentNeeded, isDeprecated, isDynamic, isEmpty, isFinal, isGeneratedEmbedClass, isImplicit, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isRequiredSkinPart, isStatic, isTopLevelDefinition, matches, resolveNamespace, resolveType, resolveType, resolveType, resolveType, resolveType, setBindable, setContainingScope, setContingent, setDynamic, setFinal, setGeneratedEmbedClass, setImplicit, setLocation, setMetaTags, setModifier, setNameLocation, setNamespaceReference, setNative, setNode, setOverride, setPublic, setStatic, setTypeReference, toStorageName, toString, unsetOverride, verify
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAbsoluteEnd, getAbsoluteStart, getAllMetaTags, getAncestorOfType, getBaseName, getBindableEventNames, getColumn, getContainingFilePath, getContainingScope, getContainingSourceFilePath, getDeprecationInfo, getEnd, getLine, getMetaTagByName, getMetaTagsByName, getModifiers, getNameColumn, getNameEnd, getNameLine, getNamespaceReference, getNameStart, getNode, getPackageName, getParent, getQualifiedName, getSourcePath, getStart, getTypeAsDisplayString, getTypeReference, hasMetaTagByName, hasModifier, hasNamespace, isBindable, isBindableStyle, isContingent, isContingentNeeded, isDeprecated, isDynamic, isFinal, isGeneratedEmbedClass, isImplicit, isInternal, isNative, isOverride, isPrivate, isProtected, isPublic, isStatic, resolveNamespace, resolveType
public static boolean isAmbiguous(IDefinition d)
d
- the definition to checkpublic static AmbiguousDefinition get()
public static IDefinition resolveAmbiguities(ICompilerProject project, List<IDefinition> defs)
project
- The Project to use to resolve thingsdefs
- an Array of definitions to comparepublic boolean isInProject(ICompilerProject project)
IDefinition
isInProject
in interface IDefinition
isInProject
in class DefinitionBase
Copyright © 2016 The Apache Software Foundation. All rights reserved.