protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
protected void consumeEmptyMethodHeaderDefaultValue() { // DefaultValueopt ::= $empty AbstractMethodDeclaration method = (AbstractMethodDeclaration)this.astStack[this.astPtr]; if(method.isAnnotationMethod()) { //'method' can be a MethodDeclaration when recovery is started pushOnExpressionStackLengthStack(0); } this.recordStringLiterals = true; } protected void consumeEmptyStatement() {
/** * @return the default value for this annotation method or <code>null</code> if there is no default value */ public Object getDefaultValue() { MethodBinding originalMethod = original(); if ((originalMethod.tagBits & TagBits.DefaultValueResolved) == 0) { //The method has not been resolved nor has its class been resolved. //It can only be from a source type within compilation units to process. if (originalMethod.declaringClass instanceof SourceTypeBinding) { SourceTypeBinding sourceType = (SourceTypeBinding) originalMethod.declaringClass; if (sourceType.scope != null) { AbstractMethodDeclaration methodDeclaration = originalMethod.sourceMethod(); if (methodDeclaration != null && methodDeclaration.isAnnotationMethod()) { methodDeclaration.resolve(sourceType.scope); } } } originalMethod.tagBits |= TagBits.DefaultValueResolved; } AnnotationHolder holder = originalMethod.declaringClass.retrieveAnnotationHolder(originalMethod, true); return holder == null ? null : holder.getDefaultValue(); }
/** * @return the default value for this annotation method or <code>null</code> if there is no default value */ public Object getDefaultValue() { MethodBinding originalMethod = original(); if ((originalMethod.tagBits & TagBits.DefaultValueResolved) == 0) { //The method has not been resolved nor has its class been resolved. //It can only be from a source type within compilation units to process. if (originalMethod.declaringClass instanceof SourceTypeBinding) { SourceTypeBinding sourceType = (SourceTypeBinding) originalMethod.declaringClass; if (sourceType.scope != null) { AbstractMethodDeclaration methodDeclaration = originalMethod.sourceMethod(); if (methodDeclaration != null && methodDeclaration.isAnnotationMethod()) { methodDeclaration.resolve(sourceType.scope); } } } originalMethod.tagBits |= TagBits.DefaultValueResolved; } AnnotationHolder holder = originalMethod.declaringClass.retrieveAnnotationHolder(originalMethod, true); return holder == null ? null : holder.getDefaultValue(); }
public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){ if(this.methodDeclaration.isAnnotationMethod()) { this.updateSourceEndIfNecessary(braceStart, braceEnd); if(!this.foundOpeningBrace && this.parent != null) { return this.parent.updateOnClosingBrace(braceStart, braceEnd); } return this; } if(this.parent != null && this.parent instanceof RecoveredType) { int mods = ((RecoveredType)this.parent).typeDeclaration.modifiers; if (TypeDeclaration.kind(mods) == TypeDeclaration.INTERFACE_DECL) { if (!this.foundOpeningBrace) { this.updateSourceEndIfNecessary(braceStart - 1, braceStart - 1); return this.parent.updateOnClosingBrace(braceStart, braceEnd); } } } return super.updateOnClosingBrace(braceStart, braceEnd); } /*
public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){ if(this.methodDeclaration.isAnnotationMethod()) { this.updateSourceEndIfNecessary(braceStart, braceEnd); if(!this.foundOpeningBrace && this.parent != null) { return this.parent.updateOnClosingBrace(braceStart, braceEnd); } return this; } if(this.parent != null && this.parent instanceof RecoveredType) { int mods = ((RecoveredType)this.parent).typeDeclaration.modifiers; if (TypeDeclaration.kind(mods) == TypeDeclaration.INTERFACE_DECL) { if (!this.foundOpeningBrace) { this.updateSourceEndIfNecessary(braceStart - 1, braceStart - 1); return this.parent.updateOnClosingBrace(braceStart, braceEnd); } } } return super.updateOnClosingBrace(braceStart, braceEnd); } /*
public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){ if(this.methodDeclaration.isAnnotationMethod()) { this.updateSourceEndIfNecessary(braceStart, braceEnd); if(!this.foundOpeningBrace && this.parent != null) { return this.parent.updateOnClosingBrace(braceStart, braceEnd); } return this; } if(this.parent != null && this.parent instanceof RecoveredType) { int mods = ((RecoveredType)this.parent).typeDeclaration.modifiers; if (TypeDeclaration.kind(mods) == TypeDeclaration.INTERFACE_DECL) { if (!this.foundOpeningBrace) { this.updateSourceEndIfNecessary(braceStart - 1, braceStart - 1); return this.parent.updateOnClosingBrace(braceStart, braceEnd); } } } return super.updateOnClosingBrace(braceStart, braceEnd); } /*
public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){ if(this.methodDeclaration.isAnnotationMethod()) { this.updateSourceEndIfNecessary(braceStart, braceEnd); if(!this.foundOpeningBrace && this.parent != null) { return this.parent.updateOnClosingBrace(braceStart, braceEnd); } return this; } if(this.parent != null && this.parent instanceof RecoveredType) { int mods = ((RecoveredType)this.parent).typeDeclaration.modifiers; if (TypeDeclaration.kind(mods) == TypeDeclaration.INTERFACE_DECL) { if (!this.foundOpeningBrace) { this.updateSourceEndIfNecessary(braceStart - 1, braceStart - 1); return this.parent.updateOnClosingBrace(braceStart, braceEnd); } } } return super.updateOnClosingBrace(braceStart, braceEnd); } /*
public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){ if(this.methodDeclaration.isAnnotationMethod()) { this.updateSourceEndIfNecessary(braceStart, braceEnd); if(!this.foundOpeningBrace && this.parent != null) { return this.parent.updateOnClosingBrace(braceStart, braceEnd); } return this; } if(this.parent != null && this.parent instanceof RecoveredType) { int mods = ((RecoveredType)this.parent).typeDeclaration.modifiers; if (TypeDeclaration.kind(mods) == TypeDeclaration.INTERFACE_DECL) { if (!this.foundOpeningBrace) { this.updateSourceEndIfNecessary(braceStart - 1, braceStart - 1); return this.parent.updateOnClosingBrace(braceStart, braceEnd); } } } return super.updateOnClosingBrace(braceStart, braceEnd); } /*
public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){ if(this.methodDeclaration.isAnnotationMethod()) { this.updateSourceEndIfNecessary(braceStart, braceEnd); if(!this.foundOpeningBrace && this.parent != null) { return this.parent.updateOnClosingBrace(braceStart, braceEnd); } return this; } if(this.parent != null && this.parent instanceof RecoveredType) { int mods = ((RecoveredType)this.parent).typeDeclaration.modifiers; if (TypeDeclaration.kind(mods) == TypeDeclaration.INTERFACE_DECL) { if (!this.foundOpeningBrace) { this.updateSourceEndIfNecessary(braceStart - 1, braceStart - 1); return this.parent.updateOnClosingBrace(braceStart, braceEnd); } } } return super.updateOnClosingBrace(braceStart, braceEnd); } /*
public RecoveredElement updateOnClosingBrace(int braceStart, int braceEnd){ if(this.methodDeclaration.isAnnotationMethod()) { this.updateSourceEndIfNecessary(braceStart, braceEnd); if(!this.foundOpeningBrace && this.parent != null) { return this.parent.updateOnClosingBrace(braceStart, braceEnd); } return this; } if(this.parent != null && this.parent instanceof RecoveredType) { int mods = ((RecoveredType)this.parent).typeDeclaration.modifiers; if (TypeDeclaration.kind(mods) == TypeDeclaration.INTERFACE_DECL) { if (!this.foundOpeningBrace) { this.updateSourceEndIfNecessary(braceStart - 1, braceStart - 1); return this.parent.updateOnClosingBrace(braceStart, braceEnd); } } } return super.updateOnClosingBrace(braceStart, braceEnd); } /*