Package org.eclipse.jdt.internal.compiler.lookup

Examples of org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding


      currentScope.problemReporter().needToEmulateFieldAccess(codegenBinding, this, isReadAccess);
      return;
    }
  } else if (this.receiver instanceof QualifiedSuperReference) { // qualified super
    // qualified super need emulation always
    SourceTypeBinding destinationType = (SourceTypeBinding) (((QualifiedSuperReference) this.receiver).currentCompatibleType);
    if (this.syntheticAccessors == null)
      this.syntheticAccessors = new MethodBinding[2];
    this.syntheticAccessors[isReadAccess ? FieldReference.READ : FieldReference.WRITE] = destinationType.addSyntheticMethod(codegenBinding, isReadAccess, isSuperAccess());
    currentScope.problemReporter().needToEmulateFieldAccess(codegenBinding, this, isReadAccess);
    return;

  } else if (this.binding.isProtected()) {
    SourceTypeBinding enclosingSourceType;
    if (((this.bits & ASTNode.DepthMASK) != 0)
      && this.binding.declaringClass.getPackage()
        != (enclosingSourceType = currentScope.enclosingSourceType()).getPackage()) {

      SourceTypeBinding currentCompatibleType =
        (SourceTypeBinding) enclosingSourceType.enclosingTypeAt(
          (this.bits & ASTNode.DepthMASK) >> ASTNode.DepthSHIFT);
      if (this.syntheticAccessors == null)
        this.syntheticAccessors = new MethodBinding[2];
      this.syntheticAccessors[isReadAccess ? FieldReference.READ : FieldReference.WRITE] = currentCompatibleType.addSyntheticMethod(codegenBinding, isReadAccess, isSuperAccess());
      currentScope.problemReporter().needToEmulateFieldAccess(codegenBinding, this, isReadAccess);
      return;
    }
  }
}
View Full Code Here


      scope.problemReporter().indirectAccessToStaticField(this, fieldBinding);
    }
    // check if accessing enum static field in initializer
    if (declaringClass.isEnum()) {
      MethodScope methodScope = scope.methodScope();
      SourceTypeBinding sourceType = scope.enclosingSourceType();
      if (this.constant == Constant.NotAConstant
          && !methodScope.isStatic
          && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
          && methodScope.isInsideInitializerOrConstructor()) {
        scope.problemReporter().enumStaticFieldUsedDuringInitialization(this.binding, this);
View Full Code Here

    this.assertionSyntheticFieldBinding = assertionSyntheticFieldBinding;

    // we need to add the field right now, because the field infos are generated before the methods
    if (needClassLiteralField) {
      SourceTypeBinding sourceType =
        this.scope.outerMostClassScope().enclosingSourceType();
      // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=22334
      if (!sourceType.isInterface() && !sourceType.isBaseType()) {
        this.classLiteralSyntheticField = sourceType.addSyntheticFieldForClassLiteral(sourceType, this.scope);
      }
    }
  }
View Full Code Here

  MethodScope methodScope = scope.methodScope();
  if (fieldBinding.isStatic()) {
    // check if accessing enum static field in initializer
    ReferenceBinding declaringClass = fieldBinding.declaringClass;
    if (declaringClass.isEnum()) {
      SourceTypeBinding sourceType = scope.enclosingSourceType();
      if (this.constant == Constant.NotAConstant
          && !methodScope.isStatic
          && (sourceType == declaringClass || sourceType.superclass == declaringClass) // enum constant body
          && methodScope.isInsideInitializerOrConstructor()) {
        scope.problemReporter().enumStaticFieldUsedDuringInitialization(fieldBinding, this);
View Full Code Here

   *
   * @param typeDeclaration org.eclipse.jdt.internal.compiler.ast.TypeDeclaration
   * @param unitResult org.eclipse.jdt.internal.compiler.CompilationUnitResult
   */
  public static void createProblemType(TypeDeclaration typeDeclaration, CompilationResult unitResult) {
    SourceTypeBinding typeBinding = typeDeclaration.binding;
    ClassFile classFile = ClassFile.getNewInstance(typeBinding);
    classFile.initialize(typeBinding, null, true);

    if (typeBinding.hasMemberTypes()) {
      // see bug 180109
      ReferenceBinding[] members = typeBinding.memberTypes;
      for (int i = 0, l = members.length; i < l; i++)
        classFile.recordInnerClasses(members[i]);
    }
    // TODO (olivier) handle cases where a field cannot be generated (name too long)
    // TODO (olivier) handle too many methods
    // inner attributes
    if (typeBinding.isNestedType()) {
      classFile.recordInnerClasses(typeBinding);
    }
    TypeVariableBinding[] typeVariables = typeBinding.typeVariables();
    for (int i = 0, max = typeVariables.length; i < max; i++) {
      TypeVariableBinding typeVariableBinding = typeVariables[i];
      if ((typeVariableBinding.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
        Util.recordNestedType(classFile, typeVariableBinding);
      }
    }
    // add its fields
    FieldBinding[] fields = typeBinding.fields();
    if ((fields != null) && (fields != Binding.NO_FIELDS)) {
      classFile.addFieldInfos();
    } else {
      // we have to set the number of fields to be equals to 0
      classFile.contents[classFile.contentsOffset++] = 0;
      classFile.contents[classFile.contentsOffset++] = 0;
    }
    // leave some space for the methodCount
    classFile.setForMethodInfos();
    // add its user defined methods
    int problemsLength;
    CategorizedProblem[] problems = unitResult.getErrors();
    if (problems == null) {
      problems = new CategorizedProblem[0];
    }
    CategorizedProblem[] problemsCopy = new CategorizedProblem[problemsLength = problems.length];
    System.arraycopy(problems, 0, problemsCopy, 0, problemsLength);

    AbstractMethodDeclaration[] methodDecls = typeDeclaration.methods;
    if (methodDecls != null) {
      if (typeBinding.isInterface()) {
        // we cannot create problem methods for an interface. So we have to generate a clinit
        // which should contain all the problem
        classFile.addProblemClinit(problemsCopy);
        for (int i = 0, length = methodDecls.length; i < length; i++) {
          AbstractMethodDeclaration methodDecl = methodDecls[i];
          MethodBinding method = methodDecl.binding;
          if (method == null || method.isConstructor()) continue;
          classFile.addAbstractMethod(methodDecl, method);
        }
      } else {
        for (int i = 0, length = methodDecls.length; i < length; i++) {
          AbstractMethodDeclaration methodDecl = methodDecls[i];
          MethodBinding method = methodDecl.binding;
          if (method == null) continue;
          if (method.isConstructor()) {
            classFile.addProblemConstructor(methodDecl, method, problemsCopy);
          } else if (method.isAbstract()) {
            classFile.addAbstractMethod(methodDecl, method);
          } else {
            classFile.addProblemMethod(methodDecl, method, problemsCopy);
          }
        }
      }
      // add abstract methods
      classFile.addDefaultAbstractMethods();
      //classFile.addSpecialMethods();
    }

    // propagate generation of (problem) member types
    if (typeDeclaration.memberTypes != null) {
      for (int i = 0, max = typeDeclaration.memberTypes.length; i < max; i++) {
        TypeDeclaration memberType = typeDeclaration.memberTypes[i];
        if (memberType.binding != null) {
          ClassFile.createProblemType(memberType, unitResult);
        }
      }
    }
    classFile.addAttributes();
    unitResult.record(typeBinding.constantPoolName(), classFile);
  }
View Full Code Here

   * This includes:
   * - a field info for each defined field of that class
   * - a field info for each synthetic field (e.g. this$0)
   */
  public void addFieldInfos() {
    SourceTypeBinding currentBinding = this.referenceBinding;
    FieldBinding[] syntheticFields = currentBinding.syntheticFields();
    int fieldCount =   currentBinding.fieldCount() + (syntheticFields == null ? 0 : syntheticFields.length);

    // write the number of fields
    if (fieldCount > 0xFFFF) {
      this.referenceBinding.scope.problemReporter().tooManyFields(this.referenceBinding.scope.referenceType());
    }
View Full Code Here

      int localVariableTableOffset = localContentsOffset;
      // leave space for attribute_length and local_variable_table_length
      localContentsOffset += 6;
      int nameIndex;
      int descriptorIndex;
      SourceTypeBinding declaringClassBinding = null;
      if (!methodDeclarationIsStatic) {
        numberOfEntries++;
        this.contents[localContentsOffset++] = 0; // the startPC for this is always 0
        this.contents[localContentsOffset++] = 0;
        this.contents[localContentsOffset++] = (byte) (code_length >> 8);
        this.contents[localContentsOffset++] = (byte) code_length;
        nameIndex = this.constantPool.literalIndex(ConstantPool.This);
        this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
        this.contents[localContentsOffset++] = (byte) nameIndex;
        declaringClassBinding = (SourceTypeBinding) this.codeStream.methodDeclaration.binding.declaringClass;
        descriptorIndex =
          this.constantPool.literalIndex(
            declaringClassBinding.signature());
        this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
        this.contents[localContentsOffset++] = (byte) descriptorIndex;
        this.contents[localContentsOffset++] = 0;// the resolved position for this is always 0
        this.contents[localContentsOffset++] = 0;
      }
      // used to remember the local variable with a generic type
      int genericLocalVariablesCounter = 0;
      LocalVariableBinding[] genericLocalVariables = null;
      int numberOfGenericEntries = 0;

      for (int i = 0, max = this.codeStream.allLocalsCounter; i < max; i++) {
        LocalVariableBinding localVariable = this.codeStream.locals[i];
        if (localVariable.declaration == null) continue;
        final TypeBinding localVariableTypeBinding = localVariable.type;
        boolean isParameterizedType = localVariableTypeBinding.isParameterizedType() || localVariableTypeBinding.isTypeVariable();
        if (localVariable.initializationCount != 0 && isParameterizedType) {
          if (genericLocalVariables == null) {
            // we cannot have more than max locals
            genericLocalVariables = new LocalVariableBinding[max];
          }
          genericLocalVariables[genericLocalVariablesCounter++] = localVariable;
        }
        for (int j = 0; j < localVariable.initializationCount; j++) {
          int startPC = localVariable.initializationPCs[j << 1];
          int endPC = localVariable.initializationPCs[(j << 1) + 1];
          if (startPC != endPC) { // only entries for non zero length
            if (endPC == -1) {
              localVariable.declaringScope.problemReporter().abortDueToInternalError(
                  Messages.bind(Messages.abort_invalidAttribute, new String(localVariable.name)),
                  (ASTNode) localVariable.declaringScope.methodScope().referenceContext);
            }
            if (isParameterizedType) {
              numberOfGenericEntries++;
            }
            // now we can safely add the local entry
            numberOfEntries++;
            this.contents[localContentsOffset++] = (byte) (startPC >> 8);
            this.contents[localContentsOffset++] = (byte) startPC;
            int length = endPC - startPC;
            this.contents[localContentsOffset++] = (byte) (length >> 8);
            this.contents[localContentsOffset++] = (byte) length;
            nameIndex = this.constantPool.literalIndex(localVariable.name);
            this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
            this.contents[localContentsOffset++] = (byte) nameIndex;
            descriptorIndex = this.constantPool.literalIndex(localVariableTypeBinding.signature());
            this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
            this.contents[localContentsOffset++] = (byte) descriptorIndex;
            int resolvedPosition = localVariable.resolvedPosition;
            this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
            this.contents[localContentsOffset++] = (byte) resolvedPosition;
          }
        }
      }
      int value = numberOfEntries * 10 + 2;
      this.contents[localVariableTableOffset++] = (byte) (value >> 24);
      this.contents[localVariableTableOffset++] = (byte) (value >> 16);
      this.contents[localVariableTableOffset++] = (byte) (value >> 8);
      this.contents[localVariableTableOffset++] = (byte) value;
      this.contents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8);
      this.contents[localVariableTableOffset] = (byte) numberOfEntries;
      attributeNumber++;

      final boolean currentInstanceIsGeneric =
        !methodDeclarationIsStatic
        && declaringClassBinding != null
        && declaringClassBinding.typeVariables != Binding.NO_TYPE_VARIABLES;
      if (genericLocalVariablesCounter != 0 || currentInstanceIsGeneric) {
        // add the local variable type table attribute
        numberOfGenericEntries += (currentInstanceIsGeneric ? 1 : 0);
        maxOfEntries = 8 + numberOfGenericEntries * 10;
        // reserve enough space
        if (localContentsOffset + maxOfEntries >= this.contents.length) {
          resizeContents(maxOfEntries);
        }
        int localVariableTypeNameIndex =
          this.constantPool.literalIndex(AttributeNamesConstants.LocalVariableTypeTableName);
        this.contents[localContentsOffset++] = (byte) (localVariableTypeNameIndex >> 8);
        this.contents[localContentsOffset++] = (byte) localVariableTypeNameIndex;
        value = numberOfGenericEntries * 10 + 2;
        this.contents[localContentsOffset++] = (byte) (value >> 24);
        this.contents[localContentsOffset++] = (byte) (value >> 16);
        this.contents[localContentsOffset++] = (byte) (value >> 8);
        this.contents[localContentsOffset++] = (byte) value;
        this.contents[localContentsOffset++] = (byte) (numberOfGenericEntries >> 8);
        this.contents[localContentsOffset++] = (byte) numberOfGenericEntries;
        if (currentInstanceIsGeneric) {
          this.contents[localContentsOffset++] = 0; // the startPC for this is always 0
          this.contents[localContentsOffset++] = 0;
          this.contents[localContentsOffset++] = (byte) (code_length >> 8);
          this.contents[localContentsOffset++] = (byte) code_length;
          nameIndex = this.constantPool.literalIndex(ConstantPool.This);
          this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
          this.contents[localContentsOffset++] = (byte) nameIndex;
          descriptorIndex = this.constantPool.literalIndex(declaringClassBinding.genericTypeSignature());
          this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
          this.contents[localContentsOffset++] = (byte) descriptorIndex;
          this.contents[localContentsOffset++] = 0;// the resolved position for this is always 0
          this.contents[localContentsOffset++] = 0;
        }
View Full Code Here

      int localVariableTableOffset = localContentsOffset;
      localContentsOffset += 6;
      // leave space for attribute_length and local_variable_table_length
      int descriptorIndex;
      int nameIndex;
      SourceTypeBinding declaringClassBinding = null;
      final boolean methodDeclarationIsStatic = this.codeStream.methodDeclaration.isStatic();
      if (!methodDeclarationIsStatic) {
        numberOfEntries++;
        if (localContentsOffset + 10 >= this.contents.length) {
          resizeContents(10);
        }
        this.contents[localContentsOffset++] = 0;
        this.contents[localContentsOffset++] = 0;
        this.contents[localContentsOffset++] = (byte) (code_length >> 8);
        this.contents[localContentsOffset++] = (byte) code_length;
        nameIndex = this.constantPool.literalIndex(ConstantPool.This);
        this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
        this.contents[localContentsOffset++] = (byte) nameIndex;
        declaringClassBinding = (SourceTypeBinding) this.codeStream.methodDeclaration.binding.declaringClass;
        descriptorIndex =
          this.constantPool.literalIndex(declaringClassBinding.signature());
        this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
        this.contents[localContentsOffset++] = (byte) descriptorIndex;
        // the resolved position for this is always 0
        this.contents[localContentsOffset++] = 0;
        this.contents[localContentsOffset++] = 0;
      }
      // used to remember the local variable with a generic type
      int genericLocalVariablesCounter = 0;
      LocalVariableBinding[] genericLocalVariables = null;
      int numberOfGenericEntries = 0;

      if (binding.isConstructor()) {
        ReferenceBinding declaringClass = binding.declaringClass;
        if (declaringClass.isNestedType()) {
          NestedTypeBinding methodDeclaringClass = (NestedTypeBinding) declaringClass;
          argSize = methodDeclaringClass.getEnclosingInstancesSlotSize();
          SyntheticArgumentBinding[] syntheticArguments;
          if ((syntheticArguments = methodDeclaringClass.syntheticEnclosingInstances()) != null) {
            for (int i = 0, max = syntheticArguments.length; i < max; i++) {
              LocalVariableBinding localVariable = syntheticArguments[i];
              final TypeBinding localVariableTypeBinding = localVariable.type;
              if (localVariableTypeBinding.isParameterizedType() || localVariableTypeBinding.isTypeVariable()) {
                if (genericLocalVariables == null) {
                  // we cannot have more than max locals
                  genericLocalVariables = new LocalVariableBinding[max];
                }
                genericLocalVariables[genericLocalVariablesCounter++] = localVariable;
                numberOfGenericEntries++;
              }
              if (localContentsOffset + 10 >= this.contents.length) {
                resizeContents(10);
              }
              // now we can safely add the local entry
              numberOfEntries++;
              this.contents[localContentsOffset++] = 0;
              this.contents[localContentsOffset++] = 0;
              this.contents[localContentsOffset++] = (byte) (code_length >> 8);
              this.contents[localContentsOffset++] = (byte) code_length;
              nameIndex = this.constantPool.literalIndex(localVariable.name);
              this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
              this.contents[localContentsOffset++] = (byte) nameIndex;
              descriptorIndex = this.constantPool.literalIndex(localVariableTypeBinding.signature());
              this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
              this.contents[localContentsOffset++] = (byte) descriptorIndex;
              int resolvedPosition = localVariable.resolvedPosition;
              this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
              this.contents[localContentsOffset++] = (byte) resolvedPosition;
            }
          }
        } else {
          argSize = 1;
        }
      } else {
        argSize = binding.isStatic() ? 0 : 1;
      }

      int genericArgumentsCounter = 0;
      int[] genericArgumentsNameIndexes = null;
      int[] genericArgumentsResolvedPositions = null;
      TypeBinding[] genericArgumentsTypeBindings = null;

      if (method.binding != null) {
        TypeBinding[] parameters = method.binding.parameters;
        Argument[] arguments = method.arguments;
        if ((parameters != null) && (arguments != null)) {
          for (int i = 0, max = parameters.length; i < max; i++) {
            TypeBinding argumentBinding = parameters[i];
            if (localContentsOffset + 10 >= this.contents.length) {
              resizeContents(10);
            }
            // now we can safely add the local entry
            numberOfEntries++;
            this.contents[localContentsOffset++] = 0;
            this.contents[localContentsOffset++] = 0;
            this.contents[localContentsOffset++] = (byte) (code_length >> 8);
            this.contents[localContentsOffset++] = (byte) code_length;
            nameIndex = this.constantPool.literalIndex(arguments[i].name);
            this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
            this.contents[localContentsOffset++] = (byte) nameIndex;
            int resolvedPosition = argSize;
            if (argumentBinding.isParameterizedType() || argumentBinding.isTypeVariable()) {
              if (genericArgumentsCounter == 0) {
                // we cannot have more than max locals
                genericArgumentsNameIndexes = new int[max];
                genericArgumentsResolvedPositions = new int[max];
                genericArgumentsTypeBindings = new TypeBinding[max];
              }
              genericArgumentsNameIndexes[genericArgumentsCounter] = nameIndex;
              genericArgumentsResolvedPositions[genericArgumentsCounter] = resolvedPosition;
              genericArgumentsTypeBindings[genericArgumentsCounter++] = argumentBinding;
            }
            descriptorIndex = this.constantPool.literalIndex(argumentBinding.signature());
            this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
            this.contents[localContentsOffset++] = (byte) descriptorIndex;
            switch(argumentBinding.id) {
              case TypeIds.T_long :
              case TypeIds.T_double :
                argSize += 2;
                break;
              default :
                argSize++;
                break;
            }
            this.contents[localContentsOffset++] = (byte) (resolvedPosition >> 8);
            this.contents[localContentsOffset++] = (byte) resolvedPosition;
          }
        }
      }
      int value = numberOfEntries * 10 + 2;
      this.contents[localVariableTableOffset++] = (byte) (value >> 24);
      this.contents[localVariableTableOffset++] = (byte) (value >> 16);
      this.contents[localVariableTableOffset++] = (byte) (value >> 8);
      this.contents[localVariableTableOffset++] = (byte) value;
      this.contents[localVariableTableOffset++] = (byte) (numberOfEntries >> 8);
      this.contents[localVariableTableOffset] = (byte) numberOfEntries;
      attributeNumber++;

      final boolean currentInstanceIsGeneric =
        !methodDeclarationIsStatic
        && declaringClassBinding != null
        && declaringClassBinding.typeVariables != Binding.NO_TYPE_VARIABLES;
      if (genericLocalVariablesCounter != 0 || genericArgumentsCounter != 0 || currentInstanceIsGeneric) {
        // add the local variable type table attribute
        numberOfEntries = numberOfGenericEntries + genericArgumentsCounter + (currentInstanceIsGeneric ? 1 : 0);
        // reserve enough space
        int maxOfEntries = 8 + numberOfEntries * 10;
        if (localContentsOffset + maxOfEntries >= this.contents.length) {
          resizeContents(maxOfEntries);
        }
        int localVariableTypeNameIndex =
          this.constantPool.literalIndex(AttributeNamesConstants.LocalVariableTypeTableName);
        this.contents[localContentsOffset++] = (byte) (localVariableTypeNameIndex >> 8);
        this.contents[localContentsOffset++] = (byte) localVariableTypeNameIndex;
        value = numberOfEntries * 10 + 2;
        this.contents[localContentsOffset++] = (byte) (value >> 24);
        this.contents[localContentsOffset++] = (byte) (value >> 16);
        this.contents[localContentsOffset++] = (byte) (value >> 8);
        this.contents[localContentsOffset++] = (byte) value;
        this.contents[localContentsOffset++] = (byte) (numberOfEntries >> 8);
        this.contents[localContentsOffset++] = (byte) numberOfEntries;
        if (currentInstanceIsGeneric) {
          numberOfEntries++;
          this.contents[localContentsOffset++] = 0; // the startPC for this is always 0
          this.contents[localContentsOffset++] = 0;
          this.contents[localContentsOffset++] = (byte) (code_length >> 8);
          this.contents[localContentsOffset++] = (byte) code_length;
          nameIndex = this.constantPool.literalIndex(ConstantPool.This);
          this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
          this.contents[localContentsOffset++] = (byte) nameIndex;
          descriptorIndex = this.constantPool.literalIndex(declaringClassBinding.genericTypeSignature());
          this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
          this.contents[localContentsOffset++] = (byte) descriptorIndex;
          this.contents[localContentsOffset++] = 0;// the resolved position for this is always 0
          this.contents[localContentsOffset++] = 0;
        }
View Full Code Here

    }

  } else if (this.receiver instanceof QualifiedSuperReference){ // qualified super

    // qualified super need emulation always
    SourceTypeBinding destinationType = (SourceTypeBinding)(((QualifiedSuperReference)this.receiver).currentCompatibleType);
    this.syntheticAccessor = destinationType.addSyntheticMethod(codegenBinding, isSuperAccess());
    currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
    return;

  } else if (this.binding.isProtected()){

    SourceTypeBinding enclosingSourceType;
    if (((this.bits & ASTNode.DepthMASK) != 0)
        && codegenBinding.declaringClass.getPackage()
          != (enclosingSourceType = currentScope.enclosingSourceType()).getPackage()){

      SourceTypeBinding currentCompatibleType = (SourceTypeBinding)enclosingSourceType.enclosingTypeAt((this.bits & ASTNode.DepthMASK) >> ASTNode.DepthSHIFT);
      this.syntheticAccessor = currentCompatibleType.addSyntheticMethod(codegenBinding, isSuperAccess());
      currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this);
      return;
    }
  }
}
View Full Code Here

  AbstractMethodDeclaration method = currentMethod.sourceMethod();
  int sourceStart = 0;
  int sourceEnd = 0;
  if (method == null) {
    if (declaringClass instanceof SourceTypeBinding) {
      SourceTypeBinding sourceTypeBinding = (SourceTypeBinding) declaringClass;
      sourceStart = sourceTypeBinding.sourceStart();
      sourceEnd = sourceTypeBinding.sourceEnd();
    }
  } else if (method.isConstructor()){
    sourceStart = method.sourceStart;
    sourceEnd = method.sourceEnd;
  } else {
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding

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.