public class JavaLanguageFeatureParser extends CLikeLanguageFeatureParserBase
Modifier and Type | Field and Description |
---|---|
static java.util.EnumSet<ETokenType> |
ADDITIONAL_TYPE_TOKENS
All token types that can be used to specify a non primitive type.
|
static java.util.EnumSet<ETokenType> |
PRIMITIVE_TYPE_TOKENS
All token types that can be used to specify a primitive type.
|
static java.util.EnumSet<ETokenType> |
VALID_IDENTIFIERS
All token types that can be used as identifier.
|
CONDITIONAL_OPERATOR_TYPES, packageSeparator, packageSeparatorText, POINTER_TYPES, primitiveTypeTokens, TYPE_MODIFICATIONS, typeTokens, useExtractor, validIdentifiers, variableSplitType
Constructor and Description |
---|
JavaLanguageFeatureParser()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<IToken> |
filterGenericTokens(java.util.List<IToken> genericTokens)
Filters the generic tokens before converting them to their token texts.
|
java.util.List<ShallowEntity> |
getAnnotations(ShallowEntity entity)
Returns all annotation entities that annotate the given entity.
|
java.util.List<ShallowEntity> |
getAnnotations(ShallowEntity entity,
boolean includeParentEntities)
Returns all annotation entities that annotate the given entity.
|
java.lang.String |
getDetailedReturnType(ShallowEntity entity)
Get the detailed return type of a method.
|
java.lang.String |
getImportName(ShallowEntity entity)
Returns the imported package name from a given "import" entity.
|
java.util.List<java.util.List<IToken>> |
getThrownTypesTokens(ShallowEntity methodEntity)
Returns all token lists representing thrown types of a method in the order of
declaration.
|
IToken |
getThrowsToken(ShallowEntity methodEntity)
Returns the token of the throws keyword of a given method.
|
boolean |
isAnnotated(ShallowEntity entity)
Returns if the entity has at least one annotation.
|
boolean |
isAnnotation(ShallowEntity entity)
Returns whether the given entity is an annotation.
|
boolean |
isConstant(ShallowEntity entity)
Returns whether the given entity is a constant.
|
boolean |
isForEachLoop(ShallowEntity entity)
Returns whether the given entity is a for each loop.
|
boolean |
isGenericExceptionClass(java.lang.String className)
Determines whether the given class name represents a generic exception.
|
boolean |
isImport(ShallowEntity entity)
Returns whether the given entity is an import (including static imports).
|
collectTokenFromTypePart, collectTokensFromModifiers, collectTokensFromPointers, collectTokensFromPrimitiveType, collectTokensFromType, collectTokensFromTypeAndModifications, extractConditionTokens, extractParameterTokens, getBaseTypeName, getGenericNamesForMethod, getGenericNamesForType, getGenericTypeNames, getImportedNames, getLanguage, getMethodOpeningParenthesisIndex, getModifiersAndTypeFromTokens, getParameterTokens, getParameterTypeNames, getPlainTypeName, getReturnType, getSplitParameterTokens, getTypeNameFromCatchTokens, getTypeNameStartIndex, getVariableNameFromCatchTokens, getVariableNameFromTokens, getVariableNamesFromTokens, getVariableReadsFromTokens, getVariableTokensFromForLikeTokens, getVariableTypeFromTokens, getVariableUsesFromTokens, getVariableWritesFromTokens, hasOnlyStaticMembers, hasVariableLengthArgumentList, hasVoidReturnType, isPrimitiveTypeToken, isStatic, isTypeToken, isVariableDeclaration, matchesFullQualifiedTypeName, reverseSkipToType, skipGeneric, skipGenericReverse, splitVariableTokens
public static final java.util.EnumSet<ETokenType> ADDITIONAL_TYPE_TOKENS
public static final java.util.EnumSet<ETokenType> PRIMITIVE_TYPE_TOKENS
public static final java.util.EnumSet<ETokenType> VALID_IDENTIFIERS
public JavaLanguageFeatureParser()
public java.lang.String getImportName(ShallowEntity entity)
getImportName
in class CLikeLanguageFeatureParserBase
public boolean isImport(ShallowEntity entity)
isImport
in class CLikeLanguageFeatureParserBase
public boolean isConstant(ShallowEntity entity)
public boolean isForEachLoop(ShallowEntity entity)
public boolean isAnnotation(ShallowEntity entity)
public java.util.List<ShallowEntity> getAnnotations(ShallowEntity entity)
public java.util.List<ShallowEntity> getAnnotations(ShallowEntity entity, boolean includeParentEntities)
public java.util.List<java.util.List<IToken>> getThrownTypesTokens(ShallowEntity methodEntity)
public IToken getThrowsToken(ShallowEntity methodEntity)
public boolean isAnnotated(ShallowEntity entity)
public java.lang.String getDetailedReturnType(ShallowEntity entity)
public boolean isGenericExceptionClass(java.lang.String className)
protected java.util.List<IToken> filterGenericTokens(java.util.List<IToken> genericTokens)
CLikeLanguageFeatureParserBase
filterGenericTokens
in class CLikeLanguageFeatureParserBase