Examples of TypeVariableBinding


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

           */
          org.aspectj.org.eclipse.jdt.internal.core.util.Util.log(e, "Could not retrieve declaring method"); //$NON-NLS-1$
        }
      }
    } else if (this.binding.isTypeVariable()) {
      TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
      Binding declaringElement = typeVariableBinding.declaringElement;
      if (declaringElement instanceof MethodBinding) {
        try {
          return this.resolver.getMethodBinding((MethodBinding)declaringElement);
        } catch (RuntimeException e) {
View Full Code Here

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

           */
          org.aspectj.org.eclipse.jdt.internal.core.util.Util.log(e, "Could not retrieve declaring class"); //$NON-NLS-1$
        }
      }
    } else if (this.binding.isTypeVariable()) {
      TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
      Binding declaringElement = typeVariableBinding.isCapture() ? ((CaptureBinding) typeVariableBinding).sourceType : typeVariableBinding.declaringElement;
      if (declaringElement instanceof ReferenceBinding) {
        try {
          return this.resolver.getTypeBinding((ReferenceBinding)declaringElement);
        } catch (RuntimeException e) {
          /* in case a method cannot be resolvable due to missing jars on the classpath
View Full Code Here

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

      case Binding.TYPE_PARAMETER :
        if (isCapture()) {
          return NO_NAME;
        }
        TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
        return new String(typeVariableBinding.sourceName);

      case Binding.PARAMETERIZED_TYPE :
        ParameterizedTypeBinding parameterizedTypeBinding = (ParameterizedTypeBinding) this.binding;
        buffer = new StringBuffer();
View Full Code Here

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

      case Binding.TYPE_PARAMETER :
        if (isCapture()) {
          return NO_NAME;
        }
        TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
        return new String(typeVariableBinding.sourceName);

      case Binding.PARAMETERIZED_TYPE :
        buffer = new StringBuffer();
        if (isMember()) {
View Full Code Here

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

  public ITypeBinding[] getTypeBounds() {
    if (this.bounds != null) {
      return this.bounds;
    }
    if (this.binding instanceof TypeVariableBinding) {
      TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
      ReferenceBinding varSuperclass = typeVariableBinding.superclass();
      org.aspectj.org.eclipse.jdt.internal.compiler.lookup.TypeBinding firstClassOrArrayBound = typeVariableBinding.firstBound;
      int boundsLength = 0;
      if (firstClassOrArrayBound != null) {
        if (firstClassOrArrayBound == varSuperclass) {
          boundsLength++;
        } else if (firstClassOrArrayBound.isArrayType()) { // capture of ? extends/super arrayType
          boundsLength++;
        } else {
          firstClassOrArrayBound = null;
        }
      }
      ReferenceBinding[] superinterfaces = typeVariableBinding.superInterfaces();
      int superinterfacesLength = 0;
      if (superinterfaces != null) {
        superinterfacesLength = superinterfaces.length;
        boundsLength += superinterfacesLength;
      }
View Full Code Here

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

        return false;
      } else {
        return !referenceBinding.isBinaryBinding();
      }
    } else if (isTypeVariable()) {
      final TypeVariableBinding typeVariableBinding = (TypeVariableBinding) this.binding;
      final Binding declaringElement = typeVariableBinding.declaringElement;
      if (declaringElement instanceof MethodBinding) {
        MethodBinding methodBinding = (MethodBinding) declaringElement;
        return !methodBinding.declaringClass.isBinaryBinding();
      } else {
View Full Code Here

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

        this.methodBinding = methods[pos];
      }
    }
     TypeVariableBinding[] typeVariableBindings = this.methodBinding != null ? this.methodBinding.typeVariables() : this.typeBinding.typeVariables();
     for (int i = 0, length = typeVariableBindings.length; i < length; i++) {
      TypeVariableBinding typeVariableBinding = typeVariableBindings[i];
      if (CharOperation.equals(typeVariableName, typeVariableBinding.sourceName())) {
        this.typeBinding = typeVariableBinding;
        return;
      }
    }
  }
View Full Code Here

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

    this.program = program;
  }

  public JNode get(Binding binding) {
    if (binding instanceof TypeVariableBinding) {
      TypeVariableBinding tvb = (TypeVariableBinding) binding;
      return get(tvb.erasure());
    } else if (binding instanceof ParameterizedTypeBinding) {
      ParameterizedTypeBinding ptb = (ParameterizedTypeBinding) binding;
      return get(ptb.erasure());
    } else if (binding instanceof ParameterizedMethodBinding) {
      ParameterizedMethodBinding pmb = (ParameterizedMethodBinding) binding;
View Full Code Here

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

        // Fall-through to failure
      }
    }

    if (binding instanceof TypeVariableBinding) {
      TypeVariableBinding tvBinding = (TypeVariableBinding) binding;
      JTypeParameter typeParameter = tvMapper.get(tvBinding);
      if (typeParameter != null) {
        return typeParameter;
      }
View Full Code Here

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

  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);
    }
  }
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.