Examples of WildcardTypeImpl


Examples of com.google.inject.internal.MoreTypes.WildcardTypeImpl

  /**
   * Returns a type that represents an unknown type that extends {@code bound}.
   */
  public static WildcardType subtypeOf(Type bound) {
    return new WildcardTypeImpl(new Type[] { bound }, MoreTypes.EMPTY_TYPE_ARRAY);
  }
View Full Code Here

Examples of com.google.inject.internal.MoreTypes.WildcardTypeImpl

  /**
   * Returns a type that represents an unknown supertype of {@code bound}.
   */
  public static WildcardType supertypeOf(Type bound) {
    return new WildcardTypeImpl(new Type[] { Object.class }, new Type[] { bound });
  }
View Full Code Here

Examples of org.elasticsearch.common.inject.internal.MoreTypes.WildcardTypeImpl

     * For example, if {@code bound} is {@code CharSequence.class}, this returns
     * {@code ? extends CharSequence}. If {@code bound} is {@code Object.class},
     * this returns {@code ?}, which is shorthand for {@code ? extends Object}.
     */
    public static WildcardType subtypeOf(Type bound) {
        return new WildcardTypeImpl(new Type[]{bound}, MoreTypes.EMPTY_TYPE_ARRAY);
    }
View Full Code Here

Examples of org.elasticsearch.common.inject.internal.MoreTypes.WildcardTypeImpl

     * Returns a type that represents an unknown supertype of {@code bound}. For
     * example, if {@code bound} is {@code String.class}, this returns {@code ?
     * super String}.
     */
    public static WildcardType supertypeOf(Type bound) {
        return new WildcardTypeImpl(new Type[]{Object.class}, new Type[]{bound});
    }
View Full Code Here

Examples of org.jboss.lang.reflect.WildcardTypeImpl

                              SignatureAttribute.TypeVariable tv = (SignatureAttribute.TypeVariable) args[i].getType();
                              Object[] bounds = new Object[] {Object.class};
                              bound = new TypeVariableImpl(bounds, targetClass, tv.getName());                          
                           }
                        }
                        typeArgs[i] = new WildcardTypeImpl(bound, args[i].getKind());
                     }
                     else if (args[i].getType() instanceof SignatureAttribute.ClassType)
                     {
                        typeArgs[i] = Class.forName(((SignatureAttribute.ClassType) args[i].getType()).getName());
                     }
View Full Code Here

Examples of org.ocpsoft.rewrite.cdi.util.WildcardTypeImpl

      if (typeParameters.length > 0) {

         Type[] actualTypeParameters = new Type[typeParameters.length];
         for (int i = 0; i < typeParameters.length; i++) {
            actualTypeParameters[i] = new WildcardTypeImpl(new Type[] { Object.class }, new Type[] {});
         }

         return new ParameterizedTypeImpl(clazz, actualTypeParameters, null);

      }
View Full Code Here

Examples of sun.reflect.generics.reflectiveObjects.WildcardTypeImpl

          if (aType instanceof Class) {
            aClass = (Class) aType;
          }
          else if (aType instanceof WildcardTypeImpl) {
            WildcardTypeImpl aWildcard = (WildcardTypeImpl) aType;
              // trying to suss out super v extends w/o resorting to string munging.
              if (aWildcard.getLowerBounds().length == 0 && aWildcard.getUpperBounds().length > 0) {
                // no lower bounds afaik indicates ? extends Foo
                aClass = ((Class)aWildcard.getUpperBounds()[0]);
              }
              else if (aWildcard.getLowerBounds().length > 0) {
                // lower & upper bounds I believe indicates something of the form Foo super Bar
                aClass = ((Class)aWildcard.getLowerBounds()[0]);
              }
              else {
                // shoot, we'll try the string hack that Adrian posted on the mailing list.
                try {
                  aClass = Class.forName(aType.toString().split(" ")[2].substring(0, aTypes[0].toString().split(" ")[2].length()-1));
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.