|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jdt.internal.compiler.parser.Parser
org.eclipse.jdt.internal.codeassist.impl.AssistParser
public abstract class AssistParser
| Field Summary | |
|---|---|
protected static int |
ASSIST_PARSER
|
ASTNode |
assistNode
|
protected int |
bracketDepth
|
protected int[] |
elementInfoStack
|
protected int[] |
elementKindStack
|
protected java.lang.Object[] |
elementObjectInfoStack
|
protected int |
elementPtr
|
protected static int |
ElementStackIncrement
|
protected boolean |
isFirst
|
boolean |
isOrphanCompletionNode
|
protected static int |
K_ATTRIBUTE_VALUE_DELIMITER
|
protected static int |
K_ENUM_CONSTANT_DELIMITER
|
protected static int |
K_FIELD_INITIALIZER_DELIMITER
|
protected static int |
K_METHOD_DELIMITER
|
protected static int |
K_SELECTOR
|
protected static int |
K_TYPE_DELIMITER
|
protected int |
lastModifiers
|
protected int |
lastModifiersStart
|
protected static int |
NO_BODY
|
protected int |
previousIdentifierPtr
|
protected int |
previousInfo
|
protected int |
previousKind
|
protected java.lang.Object |
previousObjectInfo
|
protected int |
previousToken
|
protected static int |
SUPER_CONSTRUCTOR
|
protected static int |
THIS_CONSTRUCTOR
|
protected static int |
WITH_BODY
|
| Fields inherited from interface org.eclipse.jdt.internal.compiler.parser.ParserBasicInformation |
|---|
ACCEPT_ACTION, EOFT_SYMBOL, EOLT_SYMBOL, ERROR_ACTION, ERROR_SYMBOL, LA_STATE_OFFSET, MAX_LA, MAX_NAME_LENGTH, NT_OFFSET, NUM_NON_TERMINALS, NUM_RULES, NUM_STATES, NUM_SYMBOLS, NUM_TERMINALS, SCOPE_SIZE, SCOPE_UBOUND, START_STATE |
| Fields inherited from interface org.eclipse.jdt.internal.compiler.ast.OperatorIds |
|---|
AND, AND_AND, DIVIDE, EQUAL, EQUAL_EQUAL, GREATER, GREATER_EQUAL, INSTANCEOF, LEFT_SHIFT, LESS, LESS_EQUAL, MINUS, MINUS_MINUS, MULTIPLY, NOT, NOT_EQUAL, NumberOfTables, OR, OR_OR, PLUS, PLUS_PLUS, QUESTIONCOLON, REMAINDER, RIGHT_SHIFT, TWIDDLE, UNSIGNED_RIGHT_SHIFT, XOR |
| Constructor Summary | |
|---|---|
AssistParser(ProblemReporter problemReporter)
|
|
| Method Summary | |
|---|---|
abstract char[] |
assistIdentifier()
|
java.lang.Object |
becomeSimpleParser()
The parser become a simple parser which behave like a Parser |
int |
bodyEnd(AbstractMethodDeclaration method)
|
int |
bodyEnd(Initializer initializer)
|
RecoveredElement |
buildInitialRecoveryState()
|
protected void |
consumeAnnotationTypeDeclarationHeader()
|
protected void |
consumeClassBodyDeclaration()
|
protected void |
consumeClassBodyopt()
|
protected void |
consumeClassHeader()
|
protected void |
consumeConstructorBody()
|
protected void |
consumeConstructorHeader()
|
protected void |
consumeEnhancedForStatementHeaderInit(boolean hasModifiers)
|
protected void |
consumeEnterAnonymousClassBody(boolean qualified)
|
protected void |
consumeEnterMemberValue()
|
protected void |
consumeEnumConstantHeader()
|
protected void |
consumeEnumConstantHeaderName()
|
protected void |
consumeEnumConstantNoClassBody()
|
protected void |
consumeEnumConstantWithClassBody()
|
protected void |
consumeEnumHeader()
|
protected void |
consumeExitMemberValue()
|
protected void |
consumeExplicitConstructorInvocation(int flag,
int recFlag)
|
protected void |
consumeForceNoDiet()
|
protected void |
consumeInterfaceHeader()
|
protected void |
consumeMethodBody()
|
protected void |
consumeMethodDeclaration(boolean isNotAbstract)
|
protected void |
consumeMethodHeader()
|
protected void |
consumeMethodInvocationName()
|
protected void |
consumeMethodInvocationNameWithTypeArguments()
|
protected void |
consumeMethodInvocationPrimary()
|
protected void |
consumeMethodInvocationPrimaryWithTypeArguments()
|
protected void |
consumeMethodInvocationSuper()
|
protected void |
consumeMethodInvocationSuperWithTypeArguments()
|
protected void |
consumeNestedMethod()
|
protected void |
consumeOpenBlock()
|
protected void |
consumeOpenFakeBlock()
|
protected void |
consumePackageDeclarationName()
|
protected void |
consumePackageDeclarationNameWithModifiers()
|
protected void |
consumeRestoreDiet()
|
protected void |
consumeSingleStaticImportDeclarationName()
|
protected void |
consumeSingleTypeImportDeclarationName()
|
protected void |
consumeStaticImportOnDemandDeclarationName()
|
protected void |
consumeStaticInitializer()
|
protected void |
consumeStaticOnly()
|
protected void |
consumeToken(int token)
|
protected void |
consumeTypeImportOnDemandDeclarationName()
|
abstract ImportReference |
createAssistImportReference(char[][] tokens,
long[] positions,
int mod)
|
abstract ImportReference |
createAssistPackageReference(char[][] tokens,
long[] positions)
|
abstract TypeReference |
createParameterizedQualifiedAssistTypeReference(char[][] previousIdentifiers,
TypeReference[][] typeArguments,
char[] asistIdentifier,
TypeReference[] assistTypeArguments,
long[] positions)
|
abstract TypeReference |
createParameterizedSingleAssistTypeReference(TypeReference[] typeArguments,
char[] assistName,
long position)
|
abstract NameReference |
createQualifiedAssistNameReference(char[][] previousIdentifiers,
char[] assistName,
long[] positions)
|
abstract TypeReference |
createQualifiedAssistTypeReference(char[][] previousIdentifiers,
char[] assistName,
long[] positions)
|
abstract NameReference |
createSingleAssistNameReference(char[] assistName,
long position)
|
abstract TypeReference |
createSingleAssistTypeReference(char[] assistName,
long position)
|
void |
flushAssistState()
|
protected void |
flushElementStack()
|
protected TypeReference |
getAssistTypeReferenceForGenericType(int dim,
int identifierLength,
int numberOfIdentifiers)
|
protected TypeReference |
getTypeReference(int dim)
|
protected NameReference |
getUnspecifiedReferenceOptimized()
|
void |
goForBlockStatementsopt()
|
void |
goForBlockStatementsOrCatchHeader()
|
void |
goForCompilationUnit()
|
void |
goForHeaders()
|
protected char[][] |
identifierSubSet(int subsetLength)
|
protected int |
indexOfAssistIdentifier()
|
protected int |
indexOfAssistIdentifier(boolean useGenericsStack)
|
void |
initialize()
|
void |
initialize(boolean initializeNLS)
|
abstract void |
initializeScanner()
|
protected boolean |
isIndirectlyInsideFieldInitialization()
|
protected boolean |
isIndirectlyInsideMethod()
|
protected boolean |
isIndirectlyInsideType()
|
protected boolean |
isInsideArrayInitializer()
|
protected boolean |
isInsideAttributeValue()
|
protected boolean |
isInsideFieldInitialization()
|
protected boolean |
isInsideMethod()
|
protected boolean |
isInsideType()
|
protected int |
lastIndexOfElement(int kind)
|
void |
parseBlockStatements(AbstractMethodDeclaration md,
CompilationUnitDeclaration unit)
Parse the block statements inside the given method declaration and try to complete at the cursor location. |
void |
parseBlockStatements(ConstructorDeclaration cd,
CompilationUnitDeclaration unit)
Parse the block statements inside the given constructor declaration and try to complete at the cursor location. |
void |
parseBlockStatements(Initializer initializer,
TypeDeclaration type,
CompilationUnitDeclaration unit)
Parse the block statements inside the given initializer and try to complete at the cursor location. |
void |
parseBlockStatements(MethodDeclaration md,
CompilationUnitDeclaration unit)
Parse the block statements inside the given method declaration and try to complete at the cursor location. |
protected void |
popElement(int kind)
|
protected void |
popUntilElement(int kind)
|
protected void |
prepareForBlockStatements()
|
protected void |
prepareForHeaders()
|
protected void |
pushOnElementStack(int kind)
|
protected void |
pushOnElementStack(int kind,
int info)
|
protected void |
pushOnElementStack(int kind,
int info,
java.lang.Object objectInfo)
|
void |
recoveryExitFromVariable()
|
void |
recoveryTokenCheck()
|
void |
reset()
|
void |
restoreAssistParser(java.lang.Object parserState)
Restore the parser as an assist parser |
protected boolean |
resumeAfterRecovery()
|
abstract void |
setAssistIdentifier(char[] assistIdent)
|
protected int |
topKnownElementInfo(int owner)
|
protected int |
topKnownElementInfo(int owner,
int offSet)
|
protected int |
topKnownElementKind(int owner)
|
protected int |
topKnownElementKind(int owner,
int offSet)
|
protected java.lang.Object |
topKnownElementObjectInfo(int owner)
|
protected java.lang.Object |
topKnownElementObjectInfo(int owner,
int offSet)
|
protected ASTNode |
wrapWithExplicitConstructorCallIfNeeded(ASTNode ast)
If the given ast node is inside an explicit constructor call then wrap it with a fake constructor call. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public ASTNode assistNode
public boolean isOrphanCompletionNode
protected int lastModifiers
protected int lastModifiersStart
protected int previousToken
protected int previousIdentifierPtr
protected int bracketDepth
protected static final int ElementStackIncrement
protected int elementPtr
protected int[] elementKindStack
protected int[] elementInfoStack
protected java.lang.Object[] elementObjectInfoStack
protected int previousKind
protected int previousInfo
protected java.lang.Object previousObjectInfo
protected static final int ASSIST_PARSER
protected static final int K_SELECTOR
protected static final int K_TYPE_DELIMITER
protected static final int K_METHOD_DELIMITER
protected static final int K_FIELD_INITIALIZER_DELIMITER
protected static final int K_ATTRIBUTE_VALUE_DELIMITER
protected static final int K_ENUM_CONSTANT_DELIMITER
protected static final int THIS_CONSTRUCTOR
protected static final int SUPER_CONSTRUCTOR
protected static final int NO_BODY
protected static final int WITH_BODY
protected boolean isFirst
| Constructor Detail |
|---|
public AssistParser(ProblemReporter problemReporter)
| Method Detail |
|---|
public abstract char[] assistIdentifier()
public java.lang.Object becomeSimpleParser()
public void restoreAssistParser(java.lang.Object parserState)
parserState - public int bodyEnd(AbstractMethodDeclaration method)
public int bodyEnd(Initializer initializer)
public RecoveredElement buildInitialRecoveryState()
buildInitialRecoveryState in class Parserprotected void consumeAnnotationTypeDeclarationHeader()
consumeAnnotationTypeDeclarationHeader in class Parserprotected void consumeClassBodyDeclaration()
consumeClassBodyDeclaration in class Parserprotected void consumeClassBodyopt()
consumeClassBodyopt in class Parserprotected void consumeClassHeader()
consumeClassHeader in class Parserprotected void consumeConstructorBody()
consumeConstructorBody in class Parserprotected void consumeConstructorHeader()
consumeConstructorHeader in class Parserprotected void consumeEnhancedForStatementHeaderInit(boolean hasModifiers)
consumeEnhancedForStatementHeaderInit in class Parserprotected void consumeEnterAnonymousClassBody(boolean qualified)
consumeEnterAnonymousClassBody in class Parserprotected void consumeEnterMemberValue()
consumeEnterMemberValue in class Parserprotected void consumeEnumConstantHeader()
consumeEnumConstantHeader in class Parserprotected void consumeEnumConstantHeaderName()
consumeEnumConstantHeaderName in class Parserprotected void consumeEnumConstantWithClassBody()
consumeEnumConstantWithClassBody in class Parserprotected void consumeEnumConstantNoClassBody()
consumeEnumConstantNoClassBody in class Parserprotected void consumeEnumHeader()
consumeEnumHeader in class Parserprotected void consumeExitMemberValue()
consumeExitMemberValue in class Parser
protected void consumeExplicitConstructorInvocation(int flag,
int recFlag)
consumeExplicitConstructorInvocation in class Parserprotected void consumeForceNoDiet()
consumeForceNoDiet in class Parserprotected void consumeInterfaceHeader()
consumeInterfaceHeader in class Parserprotected void consumeMethodBody()
consumeMethodBody in class Parserprotected void consumeMethodDeclaration(boolean isNotAbstract)
consumeMethodDeclaration in class Parserprotected void consumeMethodHeader()
consumeMethodHeader in class Parserprotected void consumeMethodInvocationName()
consumeMethodInvocationName in class Parserprotected void consumeMethodInvocationNameWithTypeArguments()
consumeMethodInvocationNameWithTypeArguments in class Parserprotected void consumeMethodInvocationPrimary()
consumeMethodInvocationPrimary in class Parserprotected void consumeMethodInvocationPrimaryWithTypeArguments()
consumeMethodInvocationPrimaryWithTypeArguments in class Parserprotected void consumeMethodInvocationSuper()
consumeMethodInvocationSuper in class Parserprotected void consumeMethodInvocationSuperWithTypeArguments()
consumeMethodInvocationSuperWithTypeArguments in class Parserprotected void consumeNestedMethod()
consumeNestedMethod in class Parserprotected void consumeOpenBlock()
consumeOpenBlock in class Parserprotected void consumeOpenFakeBlock()
protected void consumePackageDeclarationName()
consumePackageDeclarationName in class Parserprotected void consumePackageDeclarationNameWithModifiers()
consumePackageDeclarationNameWithModifiers in class Parserprotected void consumeRestoreDiet()
consumeRestoreDiet in class Parserprotected void consumeSingleStaticImportDeclarationName()
consumeSingleStaticImportDeclarationName in class Parserprotected void consumeSingleTypeImportDeclarationName()
consumeSingleTypeImportDeclarationName in class Parserprotected void consumeStaticImportOnDemandDeclarationName()
consumeStaticImportOnDemandDeclarationName in class Parserprotected void consumeStaticInitializer()
consumeStaticInitializer in class Parserprotected void consumeStaticOnly()
consumeStaticOnly in class Parserprotected void consumeToken(int token)
consumeToken in class Parserprotected void consumeTypeImportOnDemandDeclarationName()
consumeTypeImportOnDemandDeclarationName in class Parser
public abstract ImportReference createAssistImportReference(char[][] tokens,
long[] positions,
int mod)
public abstract ImportReference createAssistPackageReference(char[][] tokens,
long[] positions)
public abstract NameReference createQualifiedAssistNameReference(char[][] previousIdentifiers,
char[] assistName,
long[] positions)
public abstract TypeReference createQualifiedAssistTypeReference(char[][] previousIdentifiers,
char[] assistName,
long[] positions)
public abstract TypeReference createParameterizedQualifiedAssistTypeReference(char[][] previousIdentifiers,
TypeReference[][] typeArguments,
char[] asistIdentifier,
TypeReference[] assistTypeArguments,
long[] positions)
public abstract NameReference createSingleAssistNameReference(char[] assistName,
long position)
public abstract TypeReference createSingleAssistTypeReference(char[] assistName,
long position)
public abstract TypeReference createParameterizedSingleAssistTypeReference(TypeReference[] typeArguments,
char[] assistName,
long position)
public void flushAssistState()
protected void flushElementStack()
protected TypeReference getTypeReference(int dim)
getTypeReference in class Parser
protected TypeReference getAssistTypeReferenceForGenericType(int dim,
int identifierLength,
int numberOfIdentifiers)
protected NameReference getUnspecifiedReferenceOptimized()
getUnspecifiedReferenceOptimized in class Parserpublic void goForBlockStatementsopt()
goForBlockStatementsopt in class Parserpublic void goForHeaders()
goForHeaders in class Parserpublic void goForCompilationUnit()
goForCompilationUnit in class Parserpublic void goForBlockStatementsOrCatchHeader()
goForBlockStatementsOrCatchHeader in class Parserprotected char[][] identifierSubSet(int subsetLength)
protected int indexOfAssistIdentifier()
protected int indexOfAssistIdentifier(boolean useGenericsStack)
public void initialize()
initialize in class Parserpublic void initialize(boolean initializeNLS)
initialize in class Parserpublic abstract void initializeScanner()
initializeScanner in class Parserprotected boolean isIndirectlyInsideFieldInitialization()
protected boolean isIndirectlyInsideMethod()
protected boolean isIndirectlyInsideType()
protected boolean isInsideAttributeValue()
protected boolean isInsideFieldInitialization()
protected boolean isInsideMethod()
protected boolean isInsideType()
protected int lastIndexOfElement(int kind)
public void parseBlockStatements(AbstractMethodDeclaration md,
CompilationUnitDeclaration unit)
public void parseBlockStatements(ConstructorDeclaration cd,
CompilationUnitDeclaration unit)
public void parseBlockStatements(Initializer initializer,
TypeDeclaration type,
CompilationUnitDeclaration unit)
public void parseBlockStatements(MethodDeclaration md,
CompilationUnitDeclaration unit)
protected void popElement(int kind)
protected void popUntilElement(int kind)
protected void prepareForBlockStatements()
prepareForBlockStatements in class Parserprotected void prepareForHeaders()
protected void pushOnElementStack(int kind)
protected void pushOnElementStack(int kind,
int info)
protected void pushOnElementStack(int kind,
int info,
java.lang.Object objectInfo)
public void recoveryExitFromVariable()
recoveryExitFromVariable in class Parserpublic void recoveryTokenCheck()
recoveryTokenCheck in class Parserpublic void reset()
protected boolean resumeAfterRecovery()
resumeAfterRecovery in class Parserprotected boolean isInsideArrayInitializer()
public abstract void setAssistIdentifier(char[] assistIdent)
protected int topKnownElementInfo(int owner)
protected int topKnownElementInfo(int owner,
int offSet)
protected int topKnownElementKind(int owner)
protected int topKnownElementKind(int owner,
int offSet)
protected java.lang.Object topKnownElementObjectInfo(int owner,
int offSet)
protected java.lang.Object topKnownElementObjectInfo(int owner)
protected ASTNode wrapWithExplicitConstructorCallIfNeeded(ASTNode ast)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||