public abstract class ParsedElement extends Object implements IParsedElement
| Modifier and Type | Field and Description |
|---|---|
protected List<IToken> |
_tokens |
static String |
UNDEF_FILE |
static String |
UNDEF_FUNCTION |
static String |
UNDEF_MODULE |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetReturnTypepublic static final String UNDEF_MODULE
public static final String UNDEF_FUNCTION
public static final String UNDEF_FILE
public IGosuProgramInternal getGosuProgram()
getGosuProgram in interface IParsedElementpublic void setGosuProgram(IGosuProgramInternal gosuProgram)
public void addExceptionsFrom(IParsedElement elem)
addExceptionsFrom in interface IParsedElementpublic ParseTree getLocation()
getLocation in interface IParsedElementpublic void setLocation(IParseTree location)
setLocation in interface IParsedElementlocation - The location of this parsed element within the source.public ParseTree initLocation(int offset, int length, int lineNumber, int iColumn, IScriptPartId scriptPart)
public void initEmptyParseTree()
public boolean hasParseIssues()
hasParseIssues in interface IParsedElementpublic List<IParseIssue> getParseIssues()
getParseIssues in interface IParsedElementpublic List<IParseIssue> getImmediateParseIssues()
getImmediateParseIssues in interface IParsedElementpublic boolean hasParseExceptions()
hasParseExceptions in interface IParsedElementpublic boolean hasParseException(ResourceKey errKey)
hasParseException in interface IParsedElementpublic IParseIssue getImmediateParseIssue(ResourceKey errKey)
getImmediateParseIssue in interface IParsedElementpublic boolean hasImmediateParseIssue(ResourceKey errKey)
hasImmediateParseIssue in interface IParsedElementpublic boolean hasParseWarning(ResourceKey errKey)
hasParseWarning in interface IParsedElementpublic void addParseWarnings(List<IParseIssue> parseWarnings)
public void addParseExceptions(List<IParseIssue> parseExceptions)
public void addParseIssues(List<IParseIssue> parseIssues)
public List<IParseIssue> getParseExceptions()
getParseExceptions in interface IParsedElementpublic void addParseException(ResourceKey msgKey, Object... args)
addParseException in interface IParsedElementpublic void addParseException(IFullParserState parserState, ResourceKey msgKey, Object... args)
public ParseException removeParseException(ResourceKey keyToRemove)
public ParseWarning removeParseWarning(ResourceKey keyToRemove)
public void removeParseWarningRecursively(ResourceKey keyToRemove)
public IGosuClass getGosuClass()
getGosuClass in interface IParsedElementpublic void addParseWarning(ResourceKey msgKey, Object... args)
addParseWarning in interface IParsedElementpublic void addParseException(IParseIssue pe)
addParseException in interface IParsedElementpublic void clearParseExceptions()
clearParseExceptions in interface IParsedElementpublic void clearParseWarnings()
clearParseWarnings in interface IParsedElementpublic boolean hasImmediateParseWarnings()
hasImmediateParseWarnings in interface IParsedElementpublic boolean hasImmediateParseWarning(ResourceKey errKey)
public boolean hasParseWarnings()
hasParseWarnings in interface IParsedElementpublic List<IParseIssue> getParseWarnings()
getParseWarnings in interface IParsedElementpublic void addParseWarning(IParseIssue warning)
addParseWarning in interface IParsedElementpublic boolean hasParseIssue(IParseIssue pi)
hasParseIssue in interface IParsedElementpublic boolean isSuppressed(IParseIssue issue)
public boolean isSuppressed(IWarningSuppressor suppressor)
isSuppressed in interface IParsedElementpublic List<IGosuAnnotation> getAnnotations()
public boolean isCompileTimeConstant()
isCompileTimeConstant in interface IParsedElementpublic <E extends IParsedElement> boolean getContainedParsedElementsByType(Class<E> parsedElementType, List<E> listResults)
getContainedParsedElementsByType in interface IParsedElementparsedElementType - The type of parsed element to find.listResults - A list of all the contained parsed elements matching the
specified type. Can be null if you are only interested in whether or not
parsedElementType exists in this element.public boolean getContainedParsedElementsByTypes(List<IParsedElement> listResults, Class<? extends IParsedElement>... parsedElementTypes)
getContainedParsedElementsByTypes in interface IParsedElementpublic boolean getContainedParsedElementsByTypesWithIgnoreSet(List<IParsedElement> listResults, Set<Class<? extends IParsedElement>> ignoreSet, Class<? extends IParsedElement>... parsedElementTypes)
getContainedParsedElementsByTypesWithIgnoreSet in interface IParsedElementpublic static double makeDoubleValue(Object obj)
obj - Any double convertible objectpublic static float makeFloatValue(Object obj)
obj - Any float convertible objectpublic void compactParseTree()
public void clearParseTreeInformation()
clearParseTreeInformation in interface IParsedElementpublic IParsedElement getParent()
getParent in interface IParsedElementpublic void setParent(IParsedElement parent)
setParent in interface IParsedElementpublic int getLineNum()
getLineNum in interface IParsedElementpublic void adjustLineNum(int offset)
public void setLineNum(int iLineNum)
public int getColumn()
getColumn in interface IParsedElementpublic void adjustColumn(int offset)
public String getFunctionName()
getFunctionName in interface IParsedElementpublic boolean isSynthetic()
isSynthetic in interface IParsedElementpublic void setSynthetic(boolean bSynthetic)
public IModule getModule()
getModule in interface IParsedElementpublic static IFeatureInfo getEnclosingFeatureInfo(Stack<IFeatureInfo> enclosingFeatureInfos)
public static ITypeInfo getQualifyingEnclosingTypeInfo(Stack<IFeatureInfo> enclosingFeatureInfos)
public int findLineNumberOfDeclaration(String identifierName)
public IParsedElementWithAtLeastOneDeclaration findDeclaringStatement(IParsedElement element, String identifierName)
findDeclaringStatement in interface IParsedElementpublic IParsedElement findRootParsedElement()
findRootParsedElement in interface IParsedElementpublic IParsedElement findAncestorParsedElementByType(Class... parsedElementClasses)
findAncestorParsedElementByType in interface IParsedElementparsedElementClasses - List of statement types to findpublic boolean shouldClearParseInfo()
protected void addToken(IToken token, IParseTree after)
public List<IToken> getTokens()
getTokens in interface IParsedElementCopyright © 2016. All rights reserved.