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

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



  //  checkInvocationArguments(scope, this.receiver, this.actualReceiverType, this.binding, this.arguments, argumentTypes, argsContainCast, this);
    for (int i=0, len=arguments.length; i < len; i++) {
      Expression arg = arguments[i];
      TypeBinding argType = arg.resolveType(scope);
      if (argType != null) {
        TypeBinding paramType = binding.parameters[i];
        if (!argType.isCompatibleWith(paramType)) {
          scope.problemReporter().typeMismatchError(argType, paramType, arg);
        }
      }
    }
View Full Code Here


    if (length == 0) {
      return this.parameterTypes = NO_TYPE_BINDINGS;
    } else {
      ITypeBinding[] paramTypes = new ITypeBinding[length];
      for (int i = 0; i < length; i++) {
        final TypeBinding parameterBinding = parameters[i];
        if (parameterBinding != null) {
          ITypeBinding typeBinding = this.resolver.getTypeBinding(parameterBinding);
          if (typeBinding == null) {
            return this.parameterTypes = NO_TYPE_BINDINGS;
          }
View Full Code Here

          || this.binding.isStatic())
        return false;
      char[] selector = this.binding.selector;
      if (!CharOperation.equals(selector, overridenCompilerBinding.selector))
        return false;
      TypeBinding match = this.binding.declaringClass.findSuperTypeWithSameErasure(overridenCompilerBinding.declaringClass);
      if (!(match instanceof ReferenceBinding)) return false;

      org.aspectj.org.eclipse.jdt.internal.compiler.lookup.MethodBinding[] superMethods = ((ReferenceBinding)match).getMethods(selector);
      for (int i = 0, length = superMethods.length; i < length; i++) {
        if (superMethods[i].original() == overridenCompilerBinding) {
View Full Code Here

  public static void generateParameterLoads(TypeBinding[] parameters, CodeStream codeStream) {
    int paramIndex = 0;
    int varIndex = 0;
    while (paramIndex < parameters.length) {
      TypeBinding param = parameters[paramIndex++];
      codeStream.load(param, varIndex);
      varIndex += slotsNeeded(param);
    }
  }
View Full Code Here

  public static void generateParameterLoads(TypeBinding[] parameters, CodeStream codeStream, int offset) {
    int paramIndex = 0;
    int varIndex = offset;
    while (paramIndex < parameters.length) {
      TypeBinding param = parameters[paramIndex++];
      codeStream.load(param, varIndex);
      varIndex += slotsNeeded(param);
    }
  }
View Full Code Here

    this.dimension = brakets.length;
  }
 
  public void consumeBaseType(char[] baseTypeSig) {
    this.compoundName = new char[][] {getKey().toCharArray()};
    TypeBinding baseTypeBinding = getBaseTypeBinding(baseTypeSig);
    if (baseTypeBinding != null) {
      this.typeBinding = baseTypeBinding;
    }
  }
View Full Code Here

  private TypeBinding[] getTypeBindingArguments() {
    int size = this.types.size();
    TypeBinding[] arguments = new TypeBinding[size];
    for (int i = 0; i < size; i++) {
      BindingKeyResolver resolver = (BindingKeyResolver) this.types.get(i);
      TypeBinding compilerBinding2 = (TypeBinding) resolver.compilerBinding;
      if (compilerBinding2 == null) {
        throw new IllegalArgumentException();
      }
      arguments[i] = compilerBinding2;
    }
View Full Code Here

    private String typesAsString(boolean isVarargs, TypeBinding[] types, boolean makeShort) {
      StringBuffer buffer = new StringBuffer(10);
      for (int i = 0, length = types.length; i < length; i++) {
        if (i != 0)
          buffer.append(", "); //$NON-NLS-1$
        TypeBinding type = types[i];
        boolean isVarargType = isVarargs && i == length-1;
        if (isVarargType) type = ((ArrayBinding)type).elementsType();
        buffer.append(new String(makeShort ? type.shortReadableName() : type.readableName()));
        if (isVarargType) buffer.append("..."); //$NON-NLS-1$
      }
      return buffer.toString();
    }
View Full Code Here

  }
 
 
  public UnresolvedType lookupType(String name, IHasPosition location) {
    char[][] splitName = WildTypePattern.splitNames(name,true);
    TypeBinding b = scope.getType(splitName,splitName.length);
    //FIXME ??? need reasonable error handling...
    if (!b.isValidBinding()) {
      return ResolvedType.MISSING;
    }
   
    //System.err.println("binding: " + b);
    //  Binding(tokens, bits & RestrictiveFlagMASK, this)
View Full Code Here

    // check if they used stupid names for type variables
    if (aliasCount>0) {
      for (int i = 0; i < aliasCount; i++) {
        String array_element = (String)typeVariableAliases.get(i);
        SingleTypeReference str = new SingleTypeReference(array_element.toCharArray(),0);
        TypeBinding tb = str.getTypeBindingPublic(classScope);
        if (tb!=null && !(tb instanceof ProblemReferenceBinding)) {
          scope.problemReporter().signalError(sourceStart,sourceEnd,
              "Intertype declarations can only be made on the generic type, not on a parameterized type. The name '"+
              array_element+"' cannot be used as a type parameter, since it refers to a real type.");
          ignoreFurtherInvestigation = true;
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding

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.