Class BeanTypes
java.lang.Object
org.microbean.assign.Types
org.microbean.bean.BeanTypes
- All Implemented Interfaces:
Constable
A utility for working with bean types.
- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal BeanTypeListfinal voidClears caches that may be used internally by thisBeanTypes.static final booleanReturnstrueif and only if the suppliedTypeMirroris a legal bean type as defined by the CDI specification.static final booleanReturnstrueif and only if the suppliedTypeMirroris a legal, declared, proxiable bean type as defined by the CDI specification.Methods inherited from class org.microbean.assign.Types
describeConstable, domain, equals, erasedName, hashCode, supertypes, supertypes
-
Constructor Details
-
BeanTypes
Creates a newBeanTypes.- Parameters:
domain- aDomain; must not benull- Throws:
NullPointerException- ifdomainisnull
-
-
Method Details
-
beanTypes
Returns aBeanTypeListof legal bean types that the suppliedTypeMirrorbears.The returned
BeanTypeListmay be empty.- Parameters:
t- aTypeMirror; must not benull- Returns:
- a
BeanTypeListof legal bean types that the suppliedTypeMirrorbears; nevernull - Throws:
NullPointerException- iftisnull- See Also:
- Idempotency:
- This method is idempotent and returns determinate values.
- Nullability:
- This method never returns
null. - Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
clearCaches
Clears caches that may be used internally by thisBeanTypes.- Idempotency:
- This method may clear internal state but otherwise has no side effects.
- Thread Safety:
- This method is safe for concurrent use by multiple threads.
-
legalBeanType
Returnstrueif and only if the suppliedTypeMirroris a legal bean type as defined by the CDI specification.Legal bean types are, exactly:
- Array types whose component types are legal bean types
- Primitive types
- Declared types that contain no wildcard types for every interpretation and level of containment
- Parameters:
t- aTypeMirror; must not benull- Returns:
trueif and only iftis a legal bean type;falseotherwise- Throws:
NullPointerException- iftisnull- See Also:
- External Specifications
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method itself is safe for concurrent use by multiple threads, but
TypeMirrorimplementations andDomainimplementations may not be safe for such use.
-
proxiableBeanType
Returnstrueif and only if the suppliedTypeMirroris a legal, declared, proxiable bean type as defined by the CDI specification.- Parameters:
t- aTypeMirror; must not benull- Returns:
trueif and only if the suppliedTypeMirroris a proxiable bean type- Throws:
NullPointerException- iftisnull- See Also:
- External Specifications
- Idempotency:
- This method is idempotent and deterministic.
- Thread Safety:
- This method itself is safe for concurrent use by multiple threads, but
TypeMirrorimplementations andDomainimplementations may not be safe for such use.
-