Examples of WildcardType


Examples of java.lang.reflect.WildcardType

            classType((Class<?>) type, builder);
        } else if (type instanceof ParameterizedType) {
            ParameterizedType ptype = (ParameterizedType) type;
            parametizedType(ptype, builder);
        } else if (type instanceof WildcardType) {
            WildcardType ptype = (WildcardType) type;
            wildcardType(ptype, builder);
        }
    }
View Full Code Here

Examples of java.lang.reflect.WildcardType

     * @return true if condition satisfies
     * @since 1.1.1
     */
    public static boolean checkRequiredTypeIsWildCard(Type beanTypeArg, Type requiredTypeArg)
    {
        WildcardType wctRequiredTypeArg = (WildcardType)requiredTypeArg;
        Type upperBoundRequiredTypeArg =  wctRequiredTypeArg.getUpperBounds()[0];
        Type[] lowerBoundRequiredTypeArgs =  wctRequiredTypeArg.getLowerBounds();
       
        if(beanTypeArg instanceof Class)
        {
            Class<?> clazzBeanTypeArg = (Class<?>)beanTypeArg;
            if(upperBoundRequiredTypeArg instanceof Class)
View Full Code Here

Examples of java.lang.reflect.WildcardType

        }
        if (!ParameterizedType.class.isAssignableFrom(genericType.getClass())) {
            if (genericType instanceof TypeVariable) {
                genericType = getType(((TypeVariable<?>)genericType).getBounds(), pos);
            } else if (genericType instanceof WildcardType) {
                WildcardType wildcardType = (WildcardType)genericType;
                Type[] bounds = wildcardType.getLowerBounds();
                if (bounds.length == 0) {
                    bounds = wildcardType.getUpperBounds();
                }
                genericType = getType(bounds, pos);
            } else if (genericType instanceof GenericArrayType) {
                genericType = ((GenericArrayType)genericType).getGenericComponentType();
            }
View Full Code Here

Examples of javax.lang.model.type.WildcardType

      } else {
        return processingEnv.getTypeUtils().getNoType(TypeKind.NONE);
      }
    }
    if (t1.getKind() == TypeKind.WILDCARD) {
      WildcardType wc1 = (WildcardType) t1;
      Type bound = (Type) wc1.getExtendsBound();
      if (bound == null) {
        // Implicit upper bound of java.lang.Object
        Elements elements = processingEnv.getElementUtils();
        return elements.getTypeElement("java.lang.Object").asType();
      }
      t1 = bound;
    }
    if (t2.getKind() == TypeKind.WILDCARD) {
      WildcardType wc2 = (WildcardType) t2;
      Type bound = (Type) wc2.getExtendsBound();
      if (bound == null) {
        // Implicit upper bound of java.lang.Object
        Elements elements = processingEnv.getElementUtils();
        return elements.getTypeElement("java.lang.Object").asType();
      }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.dom.WildcardType

      case ASTNode.SIMPLE_TYPE:
        buffer.append(((SimpleType) type).getName().getFullyQualifiedName());
        break;
      case ASTNode.WILDCARD_TYPE:
        buffer.append('?');
        WildcardType wildcardType = (WildcardType) type;
        Type bound = wildcardType.getBound();
        if (bound == null) return;
        if (wildcardType.isUpperBound()) {
          buffer.append(" extends "); //$NON-NLS-1$
        } else {
          buffer.append(" super "); //$NON-NLS-1$
        }
        getFullyQualifiedName(bound, buffer);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.WildcardType

      case ASTNode.SIMPLE_TYPE:
        buffer.append(((SimpleType) type).getName().getFullyQualifiedName());
        break;
      case ASTNode.WILDCARD_TYPE:
        buffer.append('?');
        WildcardType wildcardType = (WildcardType) type;
        Type bound = wildcardType.getBound();
        if (bound == null) return;
        if (wildcardType.isUpperBound()) {
          buffer.append(" extends "); //$NON-NLS-1$
        } else {
          buffer.append(" super "); //$NON-NLS-1$
        }
        getFullyQualifiedName(bound, buffer);
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.