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


    long tagBits = type.tagBits & TagBits.AnnotationNullMASK;
    if (tagBits != 0)
      return validNullTagBits(tagBits);

    if (type.isWildcard()) {
      WildcardBinding wildcard = (WildcardBinding)type;
      if (wildcard.boundKind == Wildcard.UNBOUND)
        return 0;
      tagBits = wildcard.bound.tagBits & TagBits.AnnotationNullMASK;
      if (tagBits == 0)
        return 0;
View Full Code Here

    long tagBits = type.tagBits & TagBits.AnnotationNullMASK;
    if (tagBits != 0)
      return validNullTagBits(tagBits);
   
    if (type.isWildcard()) { // wildcard can be 'provided' during inheritance checks
      WildcardBinding wildcard = (WildcardBinding)type;
      if (wildcard.boundKind == Wildcard.UNBOUND)
        return 0;
      tagBits = wildcard.bound.tagBits & TagBits.AnnotationNullMASK;
      if (tagBits == 0)
        return 0;
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

    }
    TypeVariableBinding typeVariableBinding = null;
    if (this.binding instanceof TypeVariableBinding) {
      typeVariableBinding = (TypeVariableBinding) this.binding;
    } else if (this.binding instanceof WildcardBinding) {
      WildcardBinding wildcardBinding = (WildcardBinding) this.binding;
      typeVariableBinding = wildcardBinding.typeVariable();
    }
    if (typeVariableBinding != null) {
      ReferenceBinding varSuperclass = typeVariableBinding.superclass();
      org.eclipse.jdt.internal.compiler.lookup.TypeBinding firstClassOrArrayBound = typeVariableBinding.firstBound;
      int boundsLength = 0;
View Full Code Here

  }
  private static int checkInvocationArgument(BlockScope scope, Expression argument, TypeBinding parameterType, TypeBinding argumentType, TypeBinding originalParameterType) {
    argument.computeConversion(scope, parameterType, argumentType);

    if (argumentType != TypeBinding.NULL && parameterType.kind() == Binding.WILDCARD_TYPE) { // intersection types are tolerated
      WildcardBinding wildcard = (WildcardBinding) parameterType;
      if (wildcard.boundKind != Wildcard.SUPER) {
          return INVOCATION_ARGUMENT_WILDCARD;
      }
    }
    TypeBinding checkedParameterType = parameterType; // originalParameterType == null ? parameterType : originalParameterType;
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.