当前位置: 首页>>代码示例>>Java>>正文


Java GenericsFactory类代码示例

本文整理汇总了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);
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:11,代码来源:AnnotationParser.java

示例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;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:TypeVariableImpl.java

示例3: WildcardTypeImpl

import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private WildcardTypeImpl(FieldTypeSignature[] ubs,
                         FieldTypeSignature[] lbs,
                         GenericsFactory f) {
    super(f);
    upperBoundASTs = ubs;
    lowerBoundASTs = lbs;
}
 
开发者ID:tranleduy2000,项目名称:javaide,代码行数:8,代码来源:WildcardTypeImpl.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:11,代码来源:AnnotationParser.java

示例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);
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:TypeVariableImpl.java

示例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;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:TypeVariableImpl.java

示例7: WildcardTypeImpl

import sun.reflect.generics.factory.GenericsFactory; //导入依赖的package包/类
private WildcardTypeImpl(FieldTypeSignature[] ubs,
                         FieldTypeSignature[] lbs,
                         GenericsFactory f) {
    super(f);
    upperBounds = ubs;
    lowerBounds = lbs;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:8,代码来源:WildcardTypeImpl.java


注:本文中的sun.reflect.generics.factory.GenericsFactory类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。