Java Code Examples for sun.reflect.generics.factory.GenericsFactory

The following examples show how to use sun.reflect.generics.factory.GenericsFactory. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
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);
}
 
Example 2
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);
}
 
Example 3
private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
                         GenericsFactory f) {
    super(f);
    genericDeclaration = decl;
    name = n;
    boundASTs = bs;
}
 
Example 4
private WildcardTypeImpl(FieldTypeSignature[] ubs,
                         FieldTypeSignature[] lbs,
                         GenericsFactory f) {
    super(f);
    upperBoundASTs = ubs;
    lowerBoundASTs = lbs;
}
 
Example 5
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);
}
 
Example 6
private WildcardTypeImpl(FieldTypeSignature[] ubs,
                         FieldTypeSignature[] lbs,
                         GenericsFactory f) {
    super(f);
    upperBoundASTs = ubs;
    lowerBoundASTs = lbs;
}
 
Example 7
/**
 * 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);
}
 
Example 8
Source Project: jdk8u60   Source File: AnnotationParser.java    License: GNU General Public License v2.0 5 votes vote down vote up
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);
}
 
Example 9
/**
 * 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);
}
 
Example 10
Source Project: jdk8u60   Source File: TypeVariableImpl.java    License: GNU General Public License v2.0 5 votes vote down vote up
private TypeVariableImpl(D decl, String n, FieldTypeSignature[] bs,
                         GenericsFactory f) {
    super(f);
    genericDeclaration = decl;
    name = n;
    boundASTs = bs;
}
 
Example 11
Source Project: jdk1.8-source-analysis   Source File: Class.java    License: Apache License 2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, ClassScope.make(this));
}
 
Example 12
Source Project: jdk1.8-source-analysis   Source File: Method.java    License: Apache License 2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, MethodScope.make(this));
}
 
Example 13
Source Project: jdk1.8-source-analysis   Source File: Field.java    License: Apache License 2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    Class<?> c = getDeclaringClass();
    // create scope and factory
    return CoreReflectionFactory.make(c, ClassScope.make(c));
}
 
Example 14
Source Project: dragonwell8_jdk   Source File: Class.java    License: GNU General Public License v2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, ClassScope.make(this));
}
 
Example 15
Source Project: java-n-IDE-for-Android   Source File: FieldRepository.java    License: Apache License 2.0 4 votes vote down vote up
protected FieldRepository(String rawSig, GenericsFactory f) {
  super(rawSig, f);
}
 
Example 16
Source Project: dragonwell8_jdk   Source File: Method.java    License: GNU General Public License v2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, MethodScope.make(this));
}
 
Example 17
Source Project: dragonwell8_jdk   Source File: Field.java    License: GNU General Public License v2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    Class<?> c = getDeclaringClass();
    // create scope and factory
    return CoreReflectionFactory.make(c, ClassScope.make(c));
}
 
Example 18
protected ConstructorRepository(String rawSig, GenericsFactory f) {
  super(rawSig, f);
}
 
Example 19
protected LazyReflectiveObjectGenerator(GenericsFactory f) {
    factory = f;
}
 
Example 20
protected LazyReflectiveObjectGenerator(GenericsFactory f) {
    factory = f;
}
 
Example 21
private ClassRepository(String rawSig, GenericsFactory f) {
    super(rawSig, f);
}
 
Example 22
protected GenericDeclRepository(String rawSig, GenericsFactory f) {
    super(rawSig, f);
}
 
Example 23
protected GenericDeclRepository(String rawSig, GenericsFactory f) {
    super(rawSig, f);
}
 
Example 24
protected ConstructorRepository(String rawSig, GenericsFactory f) {
  super(rawSig, f);
}
 
Example 25
Source Project: openjdk-jdk8u   Source File: Method.java    License: GNU General Public License v2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, MethodScope.make(this));
}
 
Example 26
protected LazyReflectiveObjectGenerator(GenericsFactory f) {
    factory = f;
}
 
Example 27
private GenericsFactory getFactory() {
    return factory;
}
 
Example 28
Source Project: TencentKona-8   Source File: Class.java    License: GNU General Public License v2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, ClassScope.make(this));
}
 
Example 29
Source Project: TencentKona-8   Source File: Constructor.java    License: GNU General Public License v2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, ConstructorScope.make(this));
}
 
Example 30
Source Project: TencentKona-8   Source File: Method.java    License: GNU General Public License v2.0 4 votes vote down vote up
private GenericsFactory getFactory() {
    // create scope and factory
    return CoreReflectionFactory.make(this, MethodScope.make(this));
}