Examples of typeVariables()


Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

    // If there are aliases, place them in the map
    if (aliases!=null && aliases.size()>0) {
      int i =0;
      for (Iterator iter = aliases.iterator(); iter.hasNext();) {
        String element = (String) iter.next();
        typeVariableToTypeBinding.put(element,declaringType.typeVariables()[i++]);
      }
    }
   
    currentType = declaringType;
    FieldBinding fb =  new FieldBinding(member.getName().toCharArray(),
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

    if (aliases!=null && aliases.size()!=0) {
      int i=0;
      ReferenceBinding aliasTarget = (ReferenceBinding)makeTypeBinding(aliasTargetType);
      for (Iterator iter = aliases.iterator(); iter.hasNext();) {
        String element = (String) iter.next();
        typeVariableToTypeBinding.put(element,aliasTarget.typeVariables()[i++]);
      }
    }
   
    currentType = declaringType;
    MethodBinding mb =  new MethodBinding(member.getModifiers(),
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.MethodBinding.typeVariables()

  }

  @Override
  public List<? extends TypeParameterElement> getTypeParameters() {
    MethodBinding binding = (MethodBinding)_binding;
    TypeVariableBinding[] variables = binding.typeVariables();
    if (variables.length == 0) {
      return Collections.emptyList();
    }
    List<TypeParameterElement> params = new ArrayList<TypeParameterElement>(variables.length);
    for (TypeVariableBinding variable : variables) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.MethodBinding.typeVariables()

        return true; // if already determined
    }
    if (resolutionCandidate.returnType != null) {
      // resolution may have prematurely instantiated the generic method, we need the original, though:
      MethodBinding candidateOriginal = resolutionCandidate.original();
      return candidateOriginal.returnType.mentionsAny(candidateOriginal.typeVariables(), -1);
    }
  }
 
  return false;
}
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

              }
              // no conversion needed as only for reference types
              break checkIterable;

            case Binding.GENERIC_TYPE : // for (T t : Iterable<T>) - in case used inside Iterable itself
              arguments = iterableType.typeVariables();
              break;

            case Binding.PARAMETERIZED_TYPE : // for(E e : Iterable<E>)
              arguments = ((ParameterizedTypeBinding)iterableType).arguments;
              break;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

        ReferenceBinding referenceBinding = (ReferenceBinding) typeBinding;
        ReferenceBinding referenceBinding2 = (ReferenceBinding) typeBinding2;
        return CharOperation.equals(referenceBinding.compoundName, referenceBinding2.compoundName)
          && (referenceBinding.modifiers & (ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccInterface | ClassFileConstants.AccEnum | ClassFileConstants.AccAnnotation))
              == (referenceBinding2.modifiers & (ExtraCompilerModifiers.AccJustFlag | ClassFileConstants.AccInterface | ClassFileConstants.AccEnum | ClassFileConstants.AccAnnotation))
          && isEqual(referenceBinding.typeVariables(), referenceBinding2.typeVariables(), visitedTypes)
          && isEqual(referenceBinding.enclosingType(), referenceBinding2.enclosingType(), visitedTypes);

      case Binding.RAW_TYPE :
      default :
        if (!(typeBinding2 instanceof ReferenceBinding)) {
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

              }
              // no conversion needed as only for reference types
              break checkIterable;

            case Binding.GENERIC_TYPE : // for (T t : Iterable<T>) - in case used inside Iterable itself
              arguments = iterableType.typeVariables();
              break;

            case Binding.PARAMETERIZED_TYPE : // for(E e : Iterable<E>)
              arguments = ((ParameterizedTypeBinding)iterableType).arguments;
              break;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

        args.add(_env.getFactory().newTypeMirror(arg));
      }
      return Collections.unmodifiableList(args);
    }
    if (binding.isGenericType()) {
      TypeVariableBinding[] typeVariables = binding.typeVariables();
      List<TypeMirror> args = new ArrayList<TypeMirror>(typeVariables.length);
      for (TypeBinding arg : typeVariables) {
        args.add(_env.getFactory().newTypeMirror(arg));
      }
      return Collections.unmodifiableList(args);
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

    @Override
    public DeclaredType getDeclaredType(TypeElement typeElem, TypeMirror... typeArgs) {
        int typeArgsLength = typeArgs.length;
        TypeElementImpl typeElementImpl = (TypeElementImpl) typeElem;
        ReferenceBinding referenceBinding = (ReferenceBinding) typeElementImpl._binding;
        TypeVariableBinding[] typeVariables = referenceBinding.typeVariables();
        int typeVariablesLength = typeVariables.length;
        if (typeArgsLength == 0) {
            if (referenceBinding.isGenericType()) {
                // must return a raw type
                return _env.getFactory().newDeclaredType(this._env.getLookupEnvironment().createRawType(referenceBinding, null));
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.typeVariables()

    public DeclaredType getDeclaredType(DeclaredType containing, TypeElement typeElem,
            TypeMirror... typeArgs) {
        int typeArgsLength = typeArgs.length;
        TypeElementImpl typeElementImpl = (TypeElementImpl) typeElem;
        ReferenceBinding referenceBinding = (ReferenceBinding) typeElementImpl._binding;
        TypeVariableBinding[] typeVariables = referenceBinding.typeVariables();
        int typeVariablesLength = typeVariables.length;
        DeclaredTypeImpl declaredTypeImpl = (DeclaredTypeImpl) containing;
        ReferenceBinding enclosingType = (ReferenceBinding) declaredTypeImpl._binding;
        if (typeArgsLength == 0) {
            if (referenceBinding.isGenericType()) {
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.