< prev index next >

src/java.base/share/classes/java/lang/reflect/Method.java

Print this page




  96 
  97     // Accessor for factory
  98     private GenericsFactory getFactory() {
  99         // create scope and factory
 100         return CoreReflectionFactory.make(this, MethodScope.make(this));
 101     }
 102 
 103     // Accessor for generic info repository
 104     @Override
 105     MethodRepository getGenericInfo() {
 106         // lazily initialize repository if necessary
 107         if (genericInfo == null) {
 108             // create and cache generic info repository
 109             genericInfo = MethodRepository.make(getGenericSignature(),
 110                                                 getFactory());
 111         }
 112         return genericInfo; //return cached repository
 113     }
 114 
 115     /**
 116      * Package-private constructor used by ReflectAccess to enable
 117      * instantiation of these objects in Java code from the java.lang
 118      * package via sun.reflect.LangReflectAccess.
 119      */
 120     Method(Class<?> declaringClass,
 121            String name,
 122            Class<?>[] parameterTypes,
 123            Class<?> returnType,
 124            Class<?>[] checkedExceptions,
 125            int modifiers,
 126            int slot,
 127            String signature,
 128            byte[] annotations,
 129            byte[] parameterAnnotations,
 130            byte[] annotationDefault) {
 131         this.clazz = declaringClass;
 132         this.name = name;
 133         this.parameterTypes = parameterTypes;
 134         this.returnType = returnType;
 135         this.exceptionTypes = checkedExceptions;
 136         this.modifiers = modifiers;
 137         this.slot = slot;
 138         this.signature = signature;




  96 
  97     // Accessor for factory
  98     private GenericsFactory getFactory() {
  99         // create scope and factory
 100         return CoreReflectionFactory.make(this, MethodScope.make(this));
 101     }
 102 
 103     // Accessor for generic info repository
 104     @Override
 105     MethodRepository getGenericInfo() {
 106         // lazily initialize repository if necessary
 107         if (genericInfo == null) {
 108             // create and cache generic info repository
 109             genericInfo = MethodRepository.make(getGenericSignature(),
 110                                                 getFactory());
 111         }
 112         return genericInfo; //return cached repository
 113     }
 114 
 115     /**
 116      * Package-private constructor


 117      */
 118     Method(Class<?> declaringClass,
 119            String name,
 120            Class<?>[] parameterTypes,
 121            Class<?> returnType,
 122            Class<?>[] checkedExceptions,
 123            int modifiers,
 124            int slot,
 125            String signature,
 126            byte[] annotations,
 127            byte[] parameterAnnotations,
 128            byte[] annotationDefault) {
 129         this.clazz = declaringClass;
 130         this.name = name;
 131         this.parameterTypes = parameterTypes;
 132         this.returnType = returnType;
 133         this.exceptionTypes = checkedExceptions;
 134         this.modifiers = modifiers;
 135         this.slot = slot;
 136         this.signature = signature;


< prev index next >