Examples of SourceTypeBinding


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

/**
* For now, remember the compiled type using its compound name.
*/
public void record(char[] typeName, ClassFile classFile) {
    SourceTypeBinding sourceType = classFile.referenceBinding;
    if (sourceType != null) { // AspectJ Extension - does this matter??
    if (!sourceType.isLocalType() && sourceType.isHierarchyInconsistent()) {
        this.hasInconsistentToplevelHierarchies = true;
    }
    } // End AspectJ Extension - complete new if()
  this.compiledTypes.put(typeName, classFile);
}
View Full Code Here

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

    }

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

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

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

    SourceTypeBinding enclosingSourceType;
    if (((this.bits & ASTNode.DepthMASK) != 0)
        && this.codegenBinding.declaringClass.getPackage()
          != (enclosingSourceType = currentScope.invocationType()).getPackage()){// AspectJ extension - ask for the invocationType(), not the enclosingSourceType()

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

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

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

  // inner attributes
  if (typeBinding.isNestedType()) {
    classFile.recordInnerClasses(typeBinding);
  }

  // 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 {
          classFile.addProblemMethod(methodDecl, method, problemsCopy);
        }
      }
    }
    // add abstract methods
    classFile.addDefaultAbstractMethods();
  }
  // 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

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

   * @param unitResult org.aspectj.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);
    }

    // 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 {
            classFile.addProblemMethod(methodDecl, method, problemsCopy);
          }
        }
      }
      // add abstract methods
      classFile.addDefaultAbstractMethods();
    }   
   
    // 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

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

   * 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 = referenceBinding;
    FieldBinding[] syntheticFields = currentBinding.syntheticFields();
    int fieldCount =
      currentBinding.fieldCount()
        + (syntheticFields == null ? 0 : syntheticFields.length);

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

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

      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 = constantPool.literalIndex(ConstantPool.This);
        this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
        this.contents[localContentsOffset++] = (byte) nameIndex;
        declaringClassBinding = (SourceTypeBinding) codeStream.methodDeclaration.binding.declaringClass;
        descriptorIndex =
          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 = codeStream.allLocalsCounter; i < max; i++) {
        LocalVariableBinding localVariable = codeStream.locals[i];
        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 = constantPool.literalIndex(localVariable.name);
            this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
            this.contents[localContentsOffset++] = (byte) nameIndex;
            descriptorIndex = 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 =
          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 = constantPool.literalIndex(ConstantPool.This);
          this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
          this.contents[localContentsOffset++] = (byte) nameIndex;
          descriptorIndex = 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

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

      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 = 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 = constantPool.literalIndex(ConstantPool.This);
        this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
        this.contents[localContentsOffset++] = (byte) nameIndex;
        declaringClassBinding = (SourceTypeBinding) codeStream.methodDeclaration.binding.declaringClass;
        descriptorIndex =
          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.enclosingInstancesSlotSize;
          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 = constantPool.literalIndex(localVariable.name);
              this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
              this.contents[localContentsOffset++] = (byte) nameIndex;
              descriptorIndex = 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 = 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 = constantPool.literalIndex(argumentBinding.signature());
            this.contents[localContentsOffset++] = (byte) (descriptorIndex >> 8);
            this.contents[localContentsOffset++] = (byte) descriptorIndex;
            if ((argumentBinding == TypeBinding.LONG)
              || (argumentBinding == TypeBinding.DOUBLE))
              argSize += 2;
            else
              argSize++;
            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 =
          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 = constantPool.literalIndex(ConstantPool.This);
          this.contents[localContentsOffset++] = (byte) (nameIndex >> 8);
          this.contents[localContentsOffset++] = (byte) nameIndex;
          descriptorIndex = 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

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

          ResolvedMember member = factory.makeResolvedMember(amd.binding);
          if (unit != null) {
            boolean positionKnown = true;
            if (amd.binding.sourceMethod() == null) {
              if (amd.binding.declaringClass instanceof SourceTypeBinding) {
                SourceTypeBinding stb = ((SourceTypeBinding) amd.binding.declaringClass);
                if (stb.scope == null || stb.scope.referenceContext == null) {
                  positionKnown = false;
                }
              }
            }
View Full Code Here

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

        kind = superTypeX.getPerClause().getKind();
      } else {
        kind = null;
      }
    } else if (binding instanceof SourceTypeBinding) {
      SourceTypeBinding sourceSc = (SourceTypeBinding) binding;
      if (sourceSc.scope.referenceContext instanceof AspectDeclaration) {
        // code style
        kind = ((AspectDeclaration) sourceSc.scope.referenceContext).perClause.getKind();
      } else { // if (sourceSc.scope.referenceContext instanceof
        // TypeDeclaration) {
View Full Code Here

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

    }
    EclipseFactory factory = ((AjLookupEnvironment) method.scope.environment()).factory;
    if (depthCounter != 0 && targetClass.isInterface()) {// pr198196 - when calling MarkerInterface.super.XXX()
      if (call.isSuperAccess() && !call.binding.isStatic()) {
        MethodScope currentMethodScope = scope.methodScope();
        SourceTypeBinding sourceType = currentMethodScope.enclosingSourceType();
        FieldBinding field = sourceType.addSyntheticFieldForInnerclass(targetClass);
        call.receiver = new KnownFieldReference(field, call.receiver.sourceStart, call.receiver.sourceEnd);
      } else {
        return;
      }
    } else if (depthCounter == 0) { // Allow case testSuperItds_pr198196_2/3
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.