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

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


  /* (non-Javadoc)
   * @see javax.lang.model.type.WildcardType#getSuperBound()
   */
  @Override
  public TypeMirror getSuperBound() {
    WildcardBinding wildcardBinding = (WildcardBinding) this._binding;
    if (wildcardBinding.boundKind != Wildcard.SUPER) return null;
    TypeBinding bound = wildcardBinding.bound;
    if (bound == null) return null;
    return _env.getFactory().newTypeMirror(bound);
  }
View Full Code Here


      TypeBinding[] arguments = parameterizedTypeBinding.arguments;
      if (arguments != null) {
        for (int j = 0, max2 = arguments.length; j < max2; j++) {
          TypeBinding argument = arguments[j];
          if (argument.isWildcard()) {
            WildcardBinding wildcardBinding = (WildcardBinding) argument;
            TypeBinding bound = wildcardBinding.bound;
            if (bound != null
                && ((bound.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
              recordNestedType(classFile, bound);
            }
            ReferenceBinding superclass = wildcardBinding.superclass();
            if (superclass != null
                && ((superclass.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
              recordNestedType(classFile, superclass);
            }
            ReferenceBinding[] superInterfaces = wildcardBinding.superInterfaces();
            if (superInterfaces != null) {
              for (int k = 0, max3 =  superInterfaces.length; k < max3; k++) {
                ReferenceBinding superInterface = superInterfaces[k];
                if ((superInterface.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
                  recordNestedType(classFile, superInterface);
View Full Code Here

      case Binding.WILDCARD_TYPE :
        if (typeBinding2.kind() != Binding.WILDCARD_TYPE) {
          return false;
        }
        WildcardBinding wildcardBinding = (WildcardBinding) typeBinding;
        WildcardBinding wildcardBinding2 = (WildcardBinding) typeBinding2;
        return isEqual(wildcardBinding.bound, wildcardBinding2.bound, visitedTypes)
          && wildcardBinding.boundKind == wildcardBinding2.boundKind;

      case Binding.INTERSECTION_TYPE:
        if (typeBinding2.kind() != Binding.INTERSECTION_TYPE) {
          return false;
        }
        WildcardBinding intersectionBinding = (WildcardBinding) typeBinding;
        WildcardBinding intersectionBinding2 = (WildcardBinding) typeBinding2;
        return isEqual(intersectionBinding.bound, intersectionBinding2.bound, visitedTypes)
          && isEqual(intersectionBinding.otherBounds, intersectionBinding2.otherBounds, visitedTypes);

      case Binding.TYPE_PARAMETER :
        if (!(typeBinding2.isTypeVariable())) {
View Full Code Here

   */
  public ITypeBinding getBound() {
    switch (this.binding.kind()) {
      case Binding.WILDCARD_TYPE :
      case Binding.INTERSECTION_TYPE :
        WildcardBinding wildcardBinding = (WildcardBinding) this.binding;
        if (wildcardBinding.bound != null) {
          return this.resolver.getTypeBinding(wildcardBinding.bound);
        }
        break;
    }
View Full Code Here

   * @see org.eclipse.jdt.core.dom.ITypeBinding#getGenericTypeOfWildcardType()
   */
  public ITypeBinding getGenericTypeOfWildcardType() {
    switch (this.binding.kind()) {
      case Binding.WILDCARD_TYPE :
        WildcardBinding wildcardBinding = (WildcardBinding) this.binding;
        if (wildcardBinding.genericType != null) {
          return this.resolver.getTypeBinding(wildcardBinding.genericType);
        }
        break;
    }
View Full Code Here

   */
  public int getRank() {
    switch (this.binding.kind()) {
      case Binding.WILDCARD_TYPE :
      case Binding.INTERSECTION_TYPE :
        WildcardBinding wildcardBinding = (WildcardBinding) this.binding;
        return wildcardBinding.rank;
      default:
        return -1;
    }
  }
View Full Code Here

    StringBuffer buffer;
    switch (this.binding.kind()) {

      case Binding.WILDCARD_TYPE :
      case Binding.INTERSECTION_TYPE:
        WildcardBinding wildcardBinding = (WildcardBinding) this.binding;
        buffer = new StringBuffer();
        buffer.append(TypeConstants.WILDCARD_NAME);
        if (wildcardBinding.bound != null) {
          switch(wildcardBinding.boundKind) {
                case Wildcard.SUPER :
View Full Code Here

    StringBuffer buffer;
    switch (this.binding.kind()) {

      case Binding.WILDCARD_TYPE :
      case Binding.INTERSECTION_TYPE:
        WildcardBinding wildcardBinding = (WildcardBinding) this.binding;
        buffer = new StringBuffer();
        buffer.append(TypeConstants.WILDCARD_NAME);
        final ITypeBinding bound = getBound();
        if (bound != null) {
          switch(wildcardBinding.boundKind) {
View Full Code Here

      TypeBinding[] arguments = parameterizedTypeBinding.arguments;
      if (arguments != null) {
        for (int j = 0, max2 = arguments.length; j < max2; j++) {
          TypeBinding argument = arguments[j];
          if (argument.isWildcard()) {
            WildcardBinding wildcardBinding = (WildcardBinding) argument;
            TypeBinding bound = wildcardBinding.bound;
            if (bound != null
                && ((bound.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
              recordNestedType(classFile, bound);
            }
            ReferenceBinding superclass = wildcardBinding.superclass();
            if (superclass != null
                && ((superclass.tagBits & TagBits.ContainsNestedTypeReferences) != 0)) {
              recordNestedType(classFile, superclass);
            }
            ReferenceBinding[] superInterfaces = wildcardBinding.superInterfaces();
            if (superInterfaces != null) {
              for (int k = 0, max3 =  superInterfaces.length; k < max3; k++) {
                ReferenceBinding superInterface = superInterfaces[k];
                if ((superInterface.tagBits & TagBits.ContainsNestedTypeReferences) != 0) {
                  recordNestedType(classFile, superInterface);
View Full Code Here

  /* (non-Javadoc)
   * @see javax.lang.model.type.WildcardType#getExtendsBound()
   */
  @Override
  public TypeMirror getExtendsBound() {
    WildcardBinding wildcardBinding = (WildcardBinding) this._binding;
    if (wildcardBinding.boundKind != Wildcard.EXTENDS) return null;
    TypeBinding bound = wildcardBinding.bound;
    if (bound == null) return null;
    return _env.getFactory().newTypeMirror(bound);
  }
View Full Code Here

TOP

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

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.