Package org.jvnet.hk2.internal
Class Utilities
java.lang.Object
org.jvnet.hk2.internal.Utilities
This class contains a set of static utilities useful
for implementing HK2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
static interface
The return type from getAllInterceptors -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Utilities.AnnotationInformation
private static final Utilities.Interceptors
private static final String
private static Boolean
(package private) static final boolean
private static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
checkFactoryType
(Class<?> factoryClass, Collector collector) Checks to be sure the Factory class is okstatic void
checkLookupType
(Class<?> checkMe) Checks that the incoming lookup type is not improper in some way(package private) static AnnotatedElementAnnotationInfo
computeAEAI
(AnnotatedElement annotatedElement) Represents a cache miss, and will fetch all of the information needed about the AnnotatedElement in order to quickly determine what its resolver would bestatic <T> AutoActiveDescriptor
<T> createAutoDescriptor
(Class<T> clazz, ServiceLocatorImpl locator) Creates a reified automatically generated descriptorstatic <T> AutoActiveDescriptor
<T> createAutoFactoryDescriptor
(Class<T> parentClazz, ActiveDescriptor<?> factoryDescriptor, ServiceLocatorImpl locator) Creates a reified automatically generated descriptorstatic <T> T
createService
(ActiveDescriptor<T> root, Injectee injectee, ServiceLocatorImpl locator, ServiceHandle<T> handle, Class<?> requestedClass) Creates the service (without the need for an intermediate ServiceHandle to be created)findInitializerFields
(Class<?> annotatedType, ServiceLocatorImpl locator, Collector errorCollector) Will find all the initialize fields in the classfindInitializerMethods
(Class<?> annotatedType, ServiceLocatorImpl locator, Collector errorCollector) Get all the initializer methods of the annotatedType.static Method
findPostConstruct
(Class<?> clazz, ServiceLocatorImpl locator, Collector collector) Finds the post construct method on this classstatic Method
findPreDestroy
(Class<?> clazz, ServiceLocatorImpl locator, Collector collector) Finds the pre destroy method on this classstatic Constructor
<?> findProducerConstructor
(Class<?> annotatedType, ServiceLocatorImpl locator, Collector collector) Validates the constructors of the annotated type and returns the producer for the annotatedType (if there is no valid producer constructor then this method returns null)static Set
<Annotation> fixAndCheckQualifiers
(Annotation[] qualifiers, String name) This method returns a set of qualifiers from an array of qualifiers.private static Set
<Constructor<?>> getAllConstructors
(Class<?> clazz) Gets all the constructors for a given class(package private) static Utilities.Interceptors
getAllInterceptors
(ServiceLocatorImpl impl, ActiveDescriptor<?> descriptor, Class<?> clazz, Constructor<?> c) static Set
<Annotation> getAllQualifiers
(AnnotatedElement annotatedGuy, String name, Collector collector) Returns the full set of qualifier annotations on this classstatic ClassAnalyzer
getClassAnalyzer
(ServiceLocatorImpl sli, String analyzerName, Collector errorCollector) Returns the class analyzer with the given namestatic <T> Constructor
<T> getConstructor
(Class<T> implClass, ClassAnalyzer analyzer, Collector collector) Gets the constructor given the implClass and analyzer.static List
<SystemInjecteeImpl> getConstructorInjectees
(Constructor<?> c, ActiveDescriptor<?> injecteeDescriptor) Returns all the injectees for a constructorstatic String
getDefaultNameFromMethod
(Method parent, Collector collector) Returns the default name if one can be found.static Class
<?> getFactoryAwareImplementationClass
(ActiveDescriptor<?> descriptor) This utility will return the proper implementation class, taking into account that the descriptor may be a factoryprivate static Class
<?> getFactoryProductionClass
(ActiveDescriptor<?> descriptor) This method returns the class associated with the type of the factory.static Type
getFactoryProductionType
(Class<?> factoryClass) This method returns the type produced by a factory classstatic Method
getFactoryProvideMethod
(Class<?> clazz) This method will retrieve the provide method from a Factoryprivate static Set
<Annotation> getFieldAdjustedQualifierAnnotations
(Field f, Set<Annotation> qualifiers) static List
<SystemInjecteeImpl> getFieldInjectees
(Class<?> actualClass, Field f, ActiveDescriptor<?> injecteeDescriptor) Returns the injectees for a fieldstatic <T> T
getFirstThingInList
(List<T> set) Returns the first thing found in the setgetInitFields
(Class<?> implClass, ClassAnalyzer analyzer, Collector collector) Gets the initializer fields from the given class and analyzer.getInitMethods
(Class<?> implClass, ClassAnalyzer analyzer, Collector collector) Gets the initializer methods from the given class and analyzer.static Class
<? extends Annotation> getInjectionResolverType
(ActiveDescriptor<?> desc) Will return the class of the injection resolver annotation type, or null if no injection resolver annotation can be foundstatic Class<?>[]
getInterfacesForProxy
(Set<Type> contracts) Returns all the interfaces the proxy must implementstatic ActiveDescriptor
<ServiceLocator> getLocatorDescriptor
(ServiceLocator locator) Returns a constant ActiveDescriptor for the basic ServiceLocatorstatic List
<SystemInjecteeImpl> getMethodInjectees
(Class<?> actualClass, Method c, ActiveDescriptor<?> injecteeDescriptor) Returns all the injectees for a constructorstatic List
<SystemInjecteeImpl> getMethodInjectees
(Class<?> actualClass, Method c, ActiveDescriptor<?> injecteeDescriptor, Map<Integer, MethodParameter> knownValues) Returns all the injectees for a constructorprivate static Utilities.AnnotationInformation
getParamInformation
(Annotation[] memberAnnotations) static Method
getPostConstruct
(Class<?> implClass, ClassAnalyzer analyzer, Collector collector) Gets the post construct from the analyzer, checking outputstatic Method
getPreDestroy
(Class<?> implClass, ClassAnalyzer analyzer, Collector collector) Gets the preDestroy from the analyzer, checking outputstatic Class
<? extends Annotation> getScopeAnnotationType
(Class<?> fromThis, Descriptor defaultScope) Returns the scope of this thingstatic ScopeInfo
getScopeAnnotationType
(AnnotatedElement annotatedGuy, Descriptor defaultScope, Collector collector) Returns the scope of this thingprivate static ScopeInfo
getScopeInfo
(AnnotatedElement annotatedGuy, Descriptor defaultScope, Collector collector) static ActiveDescriptor
<InjectionResolver<javax.inject.Inject>> Creates a Three Thirty constant active descriptorstatic void
handleErrors
(NarrowResults results, LinkedList<ErrorService> callThese) Calls the list of error services for the list of errorsprivate static boolean
hasContract
(Class<?> clazz) private static boolean
hasSubscribeToAnnotation
(Method method) private static Annotation
internalGetScopeAnnotationType
(AnnotatedElement annotatedGuy, Collector collector) This returns the scope annotation on this class *itself*, and no other classes (like, not subclasses).static boolean
isAbstract
(Member member) Returns true if the underlying member is abstractprivate static boolean
static boolean
Returns true if the underlying member is abstractprivate static boolean
private static boolean
isProperField
(Field field) private static boolean
isProperMethod
(Method member) private static boolean
isProxiable
(ActiveDescriptor<?> desc, Injectee injectee) This method determines whether or not the descriptor should be proxied.static boolean
isProxiableScope
(Class<? extends Annotation> scope) Returns true if this scope is proxiablestatic boolean
isTypeSafe
(Type requiredType, Type beanType) This code uses the TypeChecker but does some extra checking if the types are annotationsstatic boolean
isUnproxiableScope
(Class<? extends Annotation> scope) Returns true if this scope is unproxiablestatic Object
justAssistedInject
(Object injectMe, Method method, ServiceLocatorImpl locator, ServiceHandle<?> root, MethodParameter... givenValues) Just injects this one methodstatic <T> T
justCreate
(Class<T> createMe, ServiceLocatorImpl locator, String strategy) Just creates the thing, doesn't try to do anything elsestatic void
justInject
(Object injectMe, ServiceLocatorImpl locator, String strategy) Just injects the thing, doesn't try to do anything elsestatic void
justPostConstruct
(Object postMe, ServiceLocatorImpl locator, String strategy) Post constructs the given objectstatic void
justPreDestroy
(Object preMe, ServiceLocatorImpl locator, String strategy) Pre Destroys the given objectstatic Class
<?> loadClass
(String loadMe, Descriptor fromMe, Collector collector) Loads the class using the loader from the given descriptor or the classloader of the utilities class otherwisestatic Class
<?> Load the given class for the given injectee.static boolean
Returns true if the system can create proxies, false otherwisestatic Class
<?> translatePrimitiveType
(Class<?> type) Converts the type to its java form, or returns the originalstatic void
validateSelfInjectees
(ActiveDescriptor<?> givenDescriptor, List<SystemInjecteeImpl> injectees, Collector collector) This method validates a list of injectees to ensure that any self injectees have the proper set of requirements.
-
Field Details
-
USE_SOFT_REFERENCE_PROPERTY
- See Also:
-
USE_SOFT_REFERENCE
static final boolean USE_SOFT_REFERENCE -
DEFAULT_ANNOTATION_INFORMATION
-
PROVIDE_METHOD
- See Also:
-
NOT_INTERCEPTED
-
EMTPY_INTERCEPTORS
-
proxiesAvailable
-
-
Constructor Details
-
Utilities
public Utilities()
-
-
Method Details
-
getClassAnalyzer
public static ClassAnalyzer getClassAnalyzer(ServiceLocatorImpl sli, String analyzerName, Collector errorCollector) Returns the class analyzer with the given name- Parameters:
sli
- The ServiceLocator to search in. May not be nullanalyzerName
- The name of the analyzer (may be null for the default analyzer)errorCollector
- A non-null collector of exceptions- Returns:
- The ClassAnalyzer corresponding to the name, or null if none was found
-
getConstructor
public static <T> Constructor<T> getConstructor(Class<T> implClass, ClassAnalyzer analyzer, Collector collector) Gets the constructor given the implClass and analyzer. Checks service output- Parameters:
implClass
- The implementation class (not null)analyzer
- The analyzer (not null)collector
- A collector for errors (not null)- Returns:
- null on failure (collector will have failures), non-null on success
-
getInitMethods
public static Set<Method> getInitMethods(Class<?> implClass, ClassAnalyzer analyzer, Collector collector) Gets the initializer methods from the given class and analyzer. Checks service output- Parameters:
implClass
- the non-null impl classanalyzer
- the non-null analyzercollector
- for gathering errors- Returns:
- a non-null set (even in error cases, check the collector)
-
getInitFields
public static Set<Field> getInitFields(Class<?> implClass, ClassAnalyzer analyzer, Collector collector) Gets the initializer fields from the given class and analyzer. Checks service output- Parameters:
implClass
- the non-null impl classanalyzer
- the non-null analyzercollector
- for gathering errors- Returns:
- a non-null set (even in error cases, check the collector)
-
getPostConstruct
public static Method getPostConstruct(Class<?> implClass, ClassAnalyzer analyzer, Collector collector) Gets the post construct from the analyzer, checking output- Parameters:
implClass
- The non-null implementation classanalyzer
- The non-null analyzercollector
- The non-null error collector- Returns:
- The possibly null post-construct method (check the collector for errors)
-
getPreDestroy
Gets the preDestroy from the analyzer, checking output- Parameters:
implClass
- The non-null implementation classanalyzer
- The non-null analyzercollector
- The non-null error collector- Returns:
- The possibly null pre-destroy method (check the collector for errors)
-
getFactoryAwareImplementationClass
This utility will return the proper implementation class, taking into account that the descriptor may be a factory- Parameters:
descriptor
- The descriptor (reified and not null) that will be used to find the implementation- Returns:
- The real implementation class
-
checkLookupType
Checks that the incoming lookup type is not improper in some way- Parameters:
checkMe
- class to check
-
translatePrimitiveType
Converts the type to its java form, or returns the original- Parameters:
type
- The type to convert- Returns:
- The translated type or the type itself
-
handleErrors
Calls the list of error services for the list of errors- Parameters:
results
- the resultscallThese
- the services to call
-
loadClass
Loads the class using the loader from the given descriptor or the classloader of the utilities class otherwise- Parameters:
loadMe
- The fully qualified class namefromMe
- The descriptor to use for the loadercollector
- The error collector to fill in if this returns null- Returns:
- null on failure to load (the failure will be added to the collector)
-
loadClass
Load the given class for the given injectee.- Parameters:
implementation
- the impl class name stringinjectee
- the injectee- Returns:
- The class represented by this implementation and injectee
-
getInjectionResolverType
Will return the class of the injection resolver annotation type, or null if no injection resolver annotation can be found- Parameters:
desc
- The reified descriptor to find the injection resolution on- Returns:
- The annotation type for this injection resolver
-
getFactoryProductionClass
This method returns the class associated with the type of the factory.- Parameters:
descriptor
- The descriptor (reified and not null) that will be used to find the implementation.- Returns:
- the CLASS version of what the factory produces. Will not be null.
- Throws:
MultiException
- if there was an error analyzing the class.
-
getFactoryProductionType
This method returns the type produced by a factory class- Parameters:
factoryClass
- The non-null factory class. May not be null- Returns:
- the type version of what the factory produces. Will not be null
- Throws:
MultiException
- if there was an error analyzing the class
-
checkFactoryType
Checks to be sure the Factory class is ok- Parameters:
factoryClass
- the class to checkcollector
- the exception collector
-
hasContract
-
getAutoAdvertisedTypes
-
createAutoDescriptor
public static <T> AutoActiveDescriptor<T> createAutoDescriptor(Class<T> clazz, ServiceLocatorImpl locator) throws MultiException, IllegalArgumentException, IllegalStateException Creates a reified automatically generated descriptor- Parameters:
clazz
- The class to create the desciptor forlocator
- The service locator for whom we are creating this- Returns:
- A reified active descriptor
- Throws:
MultiException
- if there was an error in the classIllegalArgumentException
- If the class is nullIllegalStateException
- If the name could not be determined from the Named annotation
-
createAutoFactoryDescriptor
public static <T> AutoActiveDescriptor<T> createAutoFactoryDescriptor(Class<T> parentClazz, ActiveDescriptor<?> factoryDescriptor, ServiceLocatorImpl locator) throws MultiException, IllegalArgumentException, IllegalStateException Creates a reified automatically generated descriptor- Parameters:
parentClazz
- The class to create the desciptor forlocator
- The service locator for whom we are creating this- Returns:
- A reified active descriptor
- Throws:
MultiException
- if there was an error in the classIllegalArgumentException
- If the class is nullIllegalStateException
- If the name could not be determined from the Named annotation
-
justPreDestroy
Pre Destroys the given object- Parameters:
preMe
- pre destroys the thinglocator
- The non-null service locator associated with the operation (for finding the strategy)strategy
- The strategy to use for analyzing the class
-
justPostConstruct
Post constructs the given object- Parameters:
postMe
- post constructs the thinglocator
- The non-null service locator associated with the operation (for finding the strategy)strategy
- The strategy to use for analyzing the class
-
justAssistedInject
public static Object justAssistedInject(Object injectMe, Method method, ServiceLocatorImpl locator, ServiceHandle<?> root, MethodParameter... givenValues) Just injects this one method- Parameters:
injectMe
-method
-locator
-givenValues
-
-
justInject
Just injects the thing, doesn't try to do anything else- Parameters:
injectMe
- The object to inject intolocator
- The locator to find the injection points withstrategy
- The strategy to use for analyzing the class
-
justCreate
Just creates the thing, doesn't try to do anything else- Parameters:
createMe
- The thing to createlocator
- The locator to find the injection points withstrategy
- The strategy to use for analyzing the class- Returns:
- The constructed thing, no further injection is performed
-
getInterfacesForProxy
Returns all the interfaces the proxy must implement- Parameters:
contracts
- All of the advertised contracts- Returns:
- The array of contracts to add to the proxy
-
isProxiableScope
Returns true if this scope is proxiable- Parameters:
scope
- The scope annotation to test- Returns:
- true if this must be proxied
-
isUnproxiableScope
Returns true if this scope is unproxiable- Parameters:
scope
- The scope annotation to test- Returns:
- true if this must be proxied
-
isProxiable
This method determines whether or not the descriptor should be proxied. The given descriptor must be reified and valid.- Parameters:
desc
- A non-null, reified ActiveDescriptorinjectee
- The injectee where this is being injected if known, or null if not known- Returns:
- true if this descriptor must be proxied, false otherwise
-
getFirstThingInList
Returns the first thing found in the set- Parameters:
set
- The set from which to get the first element- Returns:
- the first thing found in the set
-
getLocatorDescriptor
Returns a constant ActiveDescriptor for the basic ServiceLocator- Parameters:
locator
- The service locator to get the ActiveDescriptor for- Returns:
- An active descriptor specifically for the ServiceLocator
-
getThreeThirtyDescriptor
public static ActiveDescriptor<InjectionResolver<javax.inject.Inject>> getThreeThirtyDescriptor(ServiceLocatorImpl locator) Creates a Three Thirty constant active descriptor- Parameters:
locator
- The service locator to get the ActiveDescriptor for- Returns:
- An active descriptor specifically for the ServiceLocator
-
findProducerConstructor
public static Constructor<?> findProducerConstructor(Class<?> annotatedType, ServiceLocatorImpl locator, Collector collector) Validates the constructors of the annotated type and returns the producer for the annotatedType (if there is no valid producer constructor then this method returns null)- Parameters:
annotatedType
- The type to find the producer constructorlocator
- The service locator to use when analyzing constructorscollector
- The error collector- Returns:
- The producer constructor or null if the type has no valid producer constructor
-
isProperConstructor
-
getAllConstructors
Gets all the constructors for a given class- Parameters:
clazz
- The class to find the constructors of- Returns:
- A set of Constructors for the given class
-
hasSubscribeToAnnotation
-
findInitializerMethods
public static Set<Method> findInitializerMethods(Class<?> annotatedType, ServiceLocatorImpl locator, Collector errorCollector) Get all the initializer methods of the annotatedType. If there are definitional errors they will be put into the errorCollector (so as to get all the errors at one shot)- Parameters:
annotatedType
- The type to find the errors inlocator
- The locator to use when analyzing methodserrorCollector
- The collector to add errors to- Returns:
- A possibly empty but never null set of initializer methods
-
findPostConstruct
public static Method findPostConstruct(Class<?> clazz, ServiceLocatorImpl locator, Collector collector) Finds the post construct method on this class- Parameters:
clazz
- The class to search for the post constructcollector
- An error collector- Returns:
- The post construct method or null
-
findPreDestroy
public static Method findPreDestroy(Class<?> clazz, ServiceLocatorImpl locator, Collector collector) Finds the pre destroy method on this class- Parameters:
clazz
- The class to search for the pre destroy methodcollector
- An error collector- Returns:
- The pre destroy method or null
-
findInitializerFields
public static Set<Field> findInitializerFields(Class<?> annotatedType, ServiceLocatorImpl locator, Collector errorCollector) Will find all the initialize fields in the class- Parameters:
annotatedType
- The class to search for fieldslocator
- The locator to use when analyzing the classerrorCollector
- The error collector- Returns:
- A non-null but possibly empty set of initializer fields
-
computeAEAI
Represents a cache miss, and will fetch all of the information needed about the AnnotatedElement in order to quickly determine what its resolver would be- Parameters:
annotatedElement
- The raw annotated element that can be used to calculate the information needed to determine the resolver- Returns:
- An annotated element constructed from the information in the annotatedElement
-
isProperMethod
-
isProperField
-
isAbstract
Returns true if the underlying member is abstract- Parameters:
member
- The non-null member to test- Returns:
- true if the member is abstract
-
isFinal
Returns true if the underlying member is abstract- Parameters:
member
- The non-null member to test- Returns:
- true if the member is abstract
-
isFinal
-
getScopeInfo
private static ScopeInfo getScopeInfo(AnnotatedElement annotatedGuy, Descriptor defaultScope, Collector collector) -
getScopeAnnotationType
public static Class<? extends Annotation> getScopeAnnotationType(Class<?> fromThis, Descriptor defaultScope) Returns the scope of this thing- Parameters:
fromThis
- The annotated class or producer methoddefaultScope
- The default scope if none other can be found- Returns:
- The scope of this class or producer method. If no scope is found will return the dependent scope
-
getScopeAnnotationType
public static ScopeInfo getScopeAnnotationType(AnnotatedElement annotatedGuy, Descriptor defaultScope, Collector collector) Returns the scope of this thing- Parameters:
annotatedGuy
- The annotated class or producer methoddefaultScope
- The default scope if none other can be foundcollector
- The error collector- Returns:
- The scope of this class or producer method. If no scope is found will return the dependent scope
-
internalGetScopeAnnotationType
private static Annotation internalGetScopeAnnotationType(AnnotatedElement annotatedGuy, Collector collector) This returns the scope annotation on this class *itself*, and no other classes (like, not subclasses). -
getFactoryProvideMethod
This method will retrieve the provide method from a Factory- Parameters:
clazz
- This class must implement factory- Returns:
- The provide method from this class
-
getDefaultNameFromMethod
Returns the default name if one can be found. Will only work on classes and methods- Parameters:
parent
- The parent annotated elementcollector
- For errors- Returns:
- null if there is no default name (no Named)
-
getAllQualifiers
public static Set<Annotation> getAllQualifiers(AnnotatedElement annotatedGuy, String name, Collector collector) Returns the full set of qualifier annotations on this class- Parameters:
annotatedGuy
- The element we are searching for qualifiersname
- The name this element must havecollector
- The error collector- Returns:
- A non-null but possibly empty set of qualifiers
-
getParamInformation
-
getConstructorInjectees
public static List<SystemInjecteeImpl> getConstructorInjectees(Constructor<?> c, ActiveDescriptor<?> injecteeDescriptor) Returns all the injectees for a constructor- Parameters:
c
- The constructor to analyzeinjecteeDescriptor
- The descriptor of the injectee- Returns:
- the list (in order) of parameters to the constructor
-
getMethodInjectees
public static List<SystemInjecteeImpl> getMethodInjectees(Class<?> actualClass, Method c, ActiveDescriptor<?> injecteeDescriptor) Returns all the injectees for a constructor- Parameters:
c
- The constructor to analyzeinjecteeDescriptor
- The descriptor of the injectee- Returns:
- the list (in order) of parameters to the constructor
-
getMethodInjectees
public static List<SystemInjecteeImpl> getMethodInjectees(Class<?> actualClass, Method c, ActiveDescriptor<?> injecteeDescriptor, Map<Integer, MethodParameter> knownValues) Returns all the injectees for a constructor- Parameters:
c
- The constructor to analyzeinjecteeDescriptor
- The descriptor of the injectee- Returns:
- the list (in order) of parameters to the constructor
-
getFieldAdjustedQualifierAnnotations
private static Set<Annotation> getFieldAdjustedQualifierAnnotations(Field f, Set<Annotation> qualifiers) -
getFieldInjectees
public static List<SystemInjecteeImpl> getFieldInjectees(Class<?> actualClass, Field f, ActiveDescriptor<?> injecteeDescriptor) Returns the injectees for a field- Parameters:
f
- The field to analyzeinjecteeDescriptor
- The descriptor of the injectee- Returns:
- the list (in order) of parameters to the constructor
-
validateSelfInjectees
public static void validateSelfInjectees(ActiveDescriptor<?> givenDescriptor, List<SystemInjecteeImpl> injectees, Collector collector) This method validates a list of injectees to ensure that any self injectees have the proper set of requirements. It adds IllegalArgumentExceptions to the collector if it finds errors- Parameters:
givenDescriptor
- The descriptor associated with this injectee, or null if there are noneinjectees
- The list of injectees to check. Only self injectees are validatescollector
- The collector to add any errors to
-
fixAndCheckQualifiers
This method returns a set of qualifiers from an array of qualifiers. TODO It can also do some sanity checking here (i.e., multiple qualifiers of the same type, that sort of thing)- Parameters:
qualifiers
- The qualifiers to convert. May not be null, but may be zero lengthname
- The name this set of qualifiers must have- Returns:
- The set containing all the qualifiers
-
createService
public static <T> T createService(ActiveDescriptor<T> root, Injectee injectee, ServiceLocatorImpl locator, ServiceHandle<T> handle, Class<?> requestedClass) Creates the service (without the need for an intermediate ServiceHandle to be created)- Parameters:
root
- The ultimate parent of this operationinjectee
- the injectee we are creating this service forlocator
- The locator to use to find serviceshandle
- The ServiceHandle (or null if there is none)requestedClass
- The class for the service we are looking for- Returns:
- The created service
-
getAllInterceptors
static Utilities.Interceptors getAllInterceptors(ServiceLocatorImpl impl, ActiveDescriptor<?> descriptor, Class<?> clazz, Constructor<?> c) -
isTypeSafe
This code uses the TypeChecker but does some extra checking if the types are annotations- Parameters:
requiredType
- The type this must conform tobeanType
- The type of the bean we are checking- Returns:
- true if beanType is safely assignable to requiredType
-
proxiesAvailable
public static boolean proxiesAvailable()Returns true if the system can create proxies, false otherwise- Returns:
- true if the system can create proxies, false otherwise
-