本文整理汇总了Java中sun.reflect.generics.factory.GenericsFactory类的典型用法代码示例。如果您正苦于以下问题:Java GenericsFactory类的具体用法?Java GenericsFactory怎么用?Java GenericsFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GenericsFactory类属于sun.reflect.generics.factory包,在下文中一共展示了GenericsFactory类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseSig
import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private static Class<?> parseSig(String sig, Class container) {
if (sig.equals("V")) return void.class;
SignatureParser parser = SignatureParser.make();
TypeSignature typeSig = parser.parseTypeSig(sig);
GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
Reifier reify = Reifier.make(factory);
typeSig.accept(reify);
Type result = reify.getResult();
return toClass(result);
}
示例2: TypeVariableImpl
import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
GenericsFactory f) {
super(f);
genericDeclaration = decl;
name = n;
boundASTs = bs;
}
示例3: WildcardTypeImpl
import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private WildcardTypeImpl(FieldTypeSignature[] ubs,
FieldTypeSignature[] lbs,
GenericsFactory f) {
super(f);
upperBoundASTs = ubs;
lowerBoundASTs = lbs;
}
示例4: parseSig
import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private static Class<?> parseSig(String sig, Class<?> container) {
if (sig.equals("V")) return void.class;
SignatureParser parser = SignatureParser.make();
TypeSignature typeSig = parser.parseTypeSig(sig);
GenericsFactory factory = CoreReflectionFactory.make(container, ClassScope.make(container));
Reifier reify = Reifier.make(factory);
typeSig.accept(reify);
Type result = reify.getResult();
return toClass(result);
}
示例5: make
import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
/**
* Factory method.
* @param decl - the reflective object that declared the type variable
* that this method should create
* @param name - the name of the type variable to be returned
* @param bs - an array of ASTs representing the bounds for the type
* variable to be created
* @param f - a factory that can be used to manufacture reflective
* objects that represent the bounds of this type variable
* @return A type variable with name, bounds, declaration and factory
* specified
*/
public static <T extends GenericDeclaration>
TypeVariableImpl<T> make(T decl, String name,
FieldTypeSignature[] bs,
GenericsFactory f) {
if (!((decl instanceof Class) ||
(decl instanceof Method) ||
(decl instanceof Constructor))) {
throw new AssertionError("Unexpected kind of GenericDeclaration" +
decl.getClass().toString());
}
return new TypeVariableImpl<T>(decl, name, bs, f);
}
示例6: TypeVariableImpl
import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
GenericsFactory f) {
super(f);
genericDeclaration = decl;
name = n;
bounds = bs;
}
示例7: WildcardTypeImpl
import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private WildcardTypeImpl(FieldTypeSignature[] ubs,
FieldTypeSignature[] lbs,
GenericsFactory f) {
super(f);
upperBounds = ubs;
lowerBounds = lbs;
}