Package org.eclipse.jdt.internal.compiler.impl

Examples of org.eclipse.jdt.internal.compiler.impl.ReferenceContext


      if(this.typePtr > -1) {
        length = this.typePtr + 1;
        foundTypes = new TypeDeclaration[length];
        System.arraycopy(this.types, 0, foundTypes, 0, length);
      }
      ReferenceContext oldContext = Parser.this.referenceContext;
      Parser.this.recoveryScanner.resetTo(initializer.bodyStart, initializer.bodyEnd);
      Scanner oldScanner = Parser.this.scanner;
      Parser.this.scanner = Parser.this.recoveryScanner;
      parseStatements(
          this.enclosingType,
View Full Code Here


      if(this.typePtr > -1) {
        length = this.typePtr + 1;
        foundTypes = new TypeDeclaration[length];
        System.arraycopy(this.types, 0, foundTypes, 0, length);
      }
      ReferenceContext oldContext = Parser.this.referenceContext;
      Parser.this.recoveryScanner.resetTo(methodDeclaration.bodyStart, methodDeclaration.bodyEnd);
      Scanner oldScanner = Parser.this.scanner;
      Parser.this.scanner = Parser.this.recoveryScanner;
      parseStatements(
          methodDeclaration,
View Full Code Here

    BlockScope scope = this.declaringScope;
    int occurenceCount = 0;
    if (scope != null) {
      // the scope can be null. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=185129
      MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope();
      ReferenceContext referenceContext = methodScope.referenceContext;
      if (referenceContext instanceof AbstractMethodDeclaration) {
        MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding;
        if (methodBinding != null) {
          buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/));
        }
 
View Full Code Here

  }
 
  private boolean enclosingScopesHaveErrors() {
    Scope skope = this.enclosingScope;
    while (skope != null) {
      ReferenceContext context = skope.referenceContext();
      if (context != null && context.hasErrors())
        return true;
      skope = skope.parent;
    }
    return false;
  }
View Full Code Here

      }
    }
    this.resolvedType = returnType;
  }
  if (this.receiver.isSuper() && compilerOptions.getSeverity(CompilerOptions.OverridingMethodWithoutSuperInvocation) != ProblemSeverities.Ignore) {
    final ReferenceContext referenceContext = scope.methodScope().referenceContext;
    if (referenceContext instanceof AbstractMethodDeclaration) {
      final AbstractMethodDeclaration abstractMethodDeclaration = (AbstractMethodDeclaration) referenceContext;
      MethodBinding enclosingMethodBinding = abstractMethodDeclaration.binding;
      if (enclosingMethodBinding.isOverriding()
          && CharOperation.equals(this.binding.selector, enclosingMethodBinding.selector)
View Full Code Here

    BlockScope scope = this.declaringScope;
    int occurenceCount = 0;
    if (scope != null) {
      // the scope can be null. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=185129
      MethodScope methodScope = scope instanceof MethodScope ? (MethodScope) scope : scope.enclosingMethodScope();
      ReferenceContext referenceContext = methodScope.referenceContext;
      if (referenceContext instanceof AbstractMethodDeclaration) {
        MethodBinding methodBinding = ((AbstractMethodDeclaration) referenceContext).binding;
        if (methodBinding != null) {
          buffer.append(methodBinding.computeUniqueKey(false/*not a leaf*/));
        }
 
View Full Code Here

  public final boolean isDefinedInMethod(MethodBinding method) {
    method = method.original(); // https://bugs.eclipse.org/bugs/show_bug.cgi?id=350738
    Scope scope = this;
    do {
      if (scope instanceof MethodScope) {
        ReferenceContext refContext = ((MethodScope) scope).referenceContext;
        if (refContext instanceof AbstractMethodDeclaration)
          if (((AbstractMethodDeclaration) refContext).binding == method)
            return true;
      }
      scope = scope.parent;
View Full Code Here

      case Scope.BLOCK_SCOPE :
      case Scope.METHOD_SCOPE :
        MethodScope methodScope = methodScope();
        if (!methodScope.isInsideInitializer()){
          // check method modifiers to see if deprecated
          ReferenceContext referenceContext = methodScope.referenceContext;
          MethodBinding context = referenceContext instanceof AbstractMethodDeclaration ?
              ((AbstractMethodDeclaration)referenceContext).binding : ((LambdaExpression)referenceContext).binding;
          if (context != null && context.isViewedAsDeprecated())
            return true;
        } else if (methodScope.initializedField != null && methodScope.initializedField.isViewedAsDeprecated()) {
View Full Code Here

  public ReferenceContext originalReferenceContext() {
    Scope current = this;
    do {
      switch(current.kind) {
        case METHOD_SCOPE :
          ReferenceContext context = ((MethodScope) current).referenceContext;
          if (context instanceof LambdaExpression) {
            LambdaExpression expression = (LambdaExpression) context;
            while (expression != expression.original)
              expression = expression.original;
            return expression;
View Full Code Here

  }

  if (type.isParameterizedType()) {
    List missingTypes = type.collectMissingTypes(null);
    if (missingTypes != null) {
      ReferenceContext savedContext = this.referenceContext;
      for (Iterator iterator = missingTypes.iterator(); iterator.hasNext(); ) {
        try {
          invalidType(location, (TypeBinding) iterator.next());
        } finally {
          this.referenceContext = savedContext;
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.impl.ReferenceContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.