public class CsLanguageFeatureParser 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 type.
|
static java.lang.String |
EVENT_ARGS_SUFFIX
Suffix for CS-EventHandlers.
|
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> |
VARIABLE_DECLARATION_MODIFIERS
All token types that are modifiers for variables or attributes.
|
CONDITIONAL_OPERATOR_TYPES, packageSeparator, packageSeparatorText, POINTER_TYPES, primitiveTypeTokens, TYPE_MODIFICATIONS, typeTokens, useExtractor, validIdentifiers, variableSplitType
Constructor and Description |
---|
CsLanguageFeatureParser()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<IToken> |
filterGenericTokens(java.util.List<IToken> genericTokens)
Filters IN and OUT tokens from generics.
|
java.util.List<IToken> |
getBaseCallParameterTokens(ShallowEntity constructor)
Returns all parameter tokens of a base call in a constructor.
|
java.lang.String |
getImportName(ShallowEntity entity)
Returns the imported namespace name from a given "using" entity.
|
java.util.List<java.lang.String> |
getParentNames(ShallowEntity type)
Returns a list of all class names the given entity inherits from.
|
java.util.List<IToken> |
getVariableDeclarationNamesFromTokens(java.util.List<IToken> variableDeclarationTokens)
Returns all variable names from the given variable declaration tokens.
|
java.util.List<IToken> |
getVariableNamesFromForLikeTokens(java.util.List<IToken> forLikeTokens,
ETokenType endToken)
Returns all variable names from a variable declaration within a for
statement.
|
boolean |
hasVariableLengthArgumentList(java.util.List<IToken> tokens)
Returns whether the given tokens represent a variable length argument.
|
boolean |
isEventHandler(ShallowEntity method)
Checks whether the given method is a CS-EventHandler.
|
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 a using directive.
|
boolean |
isPartial(ShallowEntity entity)
Returns whether the given entity is partial.
|
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, 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> VARIABLE_DECLARATION_MODIFIERS
public static final java.lang.String EVENT_ARGS_SUFFIX
public CsLanguageFeatureParser()
public java.lang.String getImportName(ShallowEntity entity)
getImportName
in class CLikeLanguageFeatureParserBase
public boolean isImport(ShallowEntity entity)
isImport
in class CLikeLanguageFeatureParserBase
public boolean isEventHandler(ShallowEntity method)
public boolean isPartial(ShallowEntity entity)
public java.util.List<IToken> getBaseCallParameterTokens(ShallowEntity constructor)
public boolean hasVariableLengthArgumentList(java.util.List<IToken> tokens)
CLikeLanguageFeatureParserBase
hasVariableLengthArgumentList
in class CLikeLanguageFeatureParserBase
protected java.util.List<IToken> filterGenericTokens(java.util.List<IToken> genericTokens)
filterGenericTokens
in class CLikeLanguageFeatureParserBase
public java.util.List<java.lang.String> getParentNames(ShallowEntity type)
public java.util.List<IToken> getVariableNamesFromForLikeTokens(java.util.List<IToken> forLikeTokens, ETokenType endToken)
public java.util.List<IToken> getVariableDeclarationNamesFromTokens(java.util.List<IToken> variableDeclarationTokens)
public boolean isGenericExceptionClass(java.lang.String className)