Class DefaultDomain
- Author:
- Laird Nelson
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a newDefaultDomainfor use at runtime.DefaultDomain(Lock lock) Creates a newDefaultDomainfor use at runtime.Creates a newDefaultDomainwhose usage type is determined by the argument supplied to this constructor.DefaultDomain(ProcessingEnvironment pe, Lock lock) Creates a newDefaultDomainwhose usage type is determined by the arguments supplied to this constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns aUniversalTyperepresenting anArrayTypewhose component type is the same as the suppliedTypeMirror.asMemberOf(DeclaredType containingType, Element e) Returns a non-nullTypeMirrorrepresenting the type of the suppliedElementwhen thatElementis viewed as a member of, or otherwise directly contained by, the suppliedcontainingType.booleanassignable(TypeMirror payload, TypeMirror receiver) Returnstrueif and only if the suppliedpayload(the first argument) is considered assignable to the suppliedreceiver(the second argument) according to the rules of the Java Language Specification.booleanReturnstrueif and only if the suppliedExecutableElementrepresents a bridge method.booleancontains(TypeMirror t0, TypeMirror t1) Returnstrueif and only ifcandidateContainercontainscandidate, according to the Java Language Specification, section 4.5.1.declaredType(CharSequence canonicalName) A convenience method that returns theDeclaredTypeof aTypeElementthat bears the suppliedcanonicalName, ornullif there is no suchTypeElement(and therefore no suchDeclaredType).declaredType(TypeElement typeElement, TypeMirror... typeArguments) Returns theDeclaredTypeof the suppliedTypeElementwith the suppliedTypeMirrorarguments (if any), yielding a parameterized type.declaredType(DeclaredType enclosingType, TypeElement typeElement, TypeMirror... typeArguments) Returns theDeclaredTypeof the suppliedTypeElementwith the suppliedTypeMirrorarguments (if any), given a containingDeclaredTypeof which it is a member, yielding a parameterized type.Optional<? extends ConstantDesc> List<? extends UniversalType> Returns a non-nullListof the direct supertypes of the suppliedTypeMirror, which is normally a declared type.Returns theElementresponsible for declaring the suppliedTypeMirror, which is most commonly aDeclaredType, aTypeVariable, aNoTypewith aTypeKindofTypeKind.MODULE, or aNoTypewith aTypeKindofTypeKind.PACKAGE, ornullif there is no suchElement.A convenience method that returns the element type of the suppliedTypeMirror.booleanReturns the erasure of the suppliedTypeMirror.executableElement(TypeElement declaringElement, TypeMirror returnType, CharSequence name, TypeMirror... parameterTypes) A convenience method that returns anExecutableElementrepresenting the static initializer, constructor or method described by the supplied arguments, ornullif no suchExecutableElementexists.inthashCode()A convenience method that returns theTypeElementrepresenting the class namedjava.lang.Object.final Unlockablelock()Returns a non-nullUnlockablethat should be used in atry-with-resources block guarding operations that might cause symbol completion.moduleElement(CharSequence canonicalName) Returns aModuleElementrepresenting the module named by the suppliedqualifiedName, ornullif there is no suchModuleElement.name(CharSequence name) Returns aNamerepresenting the suppliedCharSequence.Returns aNoTypebearing the suppliedTypeKind, if the suppliedTypeKindis eitherTypeKind.NONEorTypeKind.VOID.nullType()packageElement(CharSequence canonicalName) Returns aPackageElementrepresenting the package bearing the suppliedcanonicalName, ornullif there is no suchPackageElement.packageElement(ModuleElement asSeenFrom, CharSequence canonicalName) Returns aPackageElementrepresenting the package bearing the suppliedcanonicalNameas seen from the module represented by the suppliedModuleElement, ornullif there is no suchPackageElement.primitiveType(CharSequence canonicalName) Returns the result of applying unboxing conversion to the (logical)TypeElementbearing the suppliedcanonicalName.Returns the result of applying unboxing conversion to the type declared by the suppliedTypeElement.primitiveType(TypeKind kind) Returns the result of applying unboxing conversion to the suppliedTypeMirror.A convenience method that returns the raw type corresponding tot, ornulliftis incapable of yielding a raw type.Returns aRecordComponentElementcorresponding to the suppliedExecutableElement, ornullif there is no suchRecordComponentElement.booleansameType(TypeMirror t0, TypeMirror t1) Returnstrueif and only if the two arguments represent the same type.booleansubsignature(ExecutableType t0, ExecutableType t1) Returnstrueif and only ifet0is a subsignature ofet1.booleansubtype(TypeMirror candidateSubtype, TypeMirror candidateSupertype) Returnstrueif and only ifcandidateSubtypeis a subtype ofsupertype.toString(CharSequence name) Converts the suppliedCharSequence, which is often aName, into aString, and returns the conversion, locking when appropriate to serialize symbol completion.typeElement(CharSequence canonicalName) Returns aTypeElementrepresenting the element bearing the supplied canonical name, ornullif there is no suchTypeElement.typeElement(ModuleElement asSeenFrom, CharSequence canonicalName) Returns aTypeElementrepresenting the element bearing the supplied canonical name, as read or seen from the module represented by the suppliedModuleElement, ornullif there is no suchTypeElement.Returns aTypeElementrepresenting the result of applying boxing conversion to the primitive type represented by the suppliedPrimitiveTypeargument.typeElement(TypeKind primitiveTypeKind) Returns aTypeElementrepresenting the result of applying boxing conversion to the primitive type represented by the suppliedTypeKindargument, if it is primitive.Returns theTypeParameterElementcontained by the suppliedParameterizablewhose name is equal to the suppliedname, ornullif there is no suchTypeParameterElement.typeVariable(Parameterizable p, CharSequence name) A convenience method that returns theTypeVariabledeclared by theTypeParameterElementcontained by the suppliedParameterizablewhose name is equal to the suppliedname, ornullif there is no suchTypeParameterElementorTypeVariable.variableElement(Element e, CharSequence name) A convenience method that returns the firstVariableElementwith a variableElementKindand bearing the suppliedsimpleNamethat the suppliedenclosingElementencloses, ornullif there is no suchVariableElement.A convenience method that returns a newWildcardTypewith aTypeKindofTypeKind.WILDCARD, an extends bound ofnull, and a super bound ofnull.wildcardType(TypeMirror extendsBound, TypeMirror superBound) Returns a newWildcardTypewith aTypeKindofTypeKind.WILDCARD, an extends bound of the suppliedextendsBound, and a super bound of the suppliedsuperBound.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.microbean.construct.Domain
executableElement, generic, generic, javaLangObject, javaLangObject, parameterizable, parameterized, raw, type, types
-
Constructor Details
-
DefaultDomain
-
DefaultDomain
Creates a newDefaultDomainwhose usage type is determined by the argument supplied to this constructor.- Parameters:
pe- aProcessingEnvironment; may benullin which case the return value of an invocation ofSupplier.get()on the return value of an invocation ofRuntimeProcessingEnvironmentSupplier.of()will be used instead- See Also:
-
DefaultDomain
Creates a newDefaultDomainfor use at runtime.- Parameters:
lock- aLockto use to serialize symbol completion; may benullin which case a globalReentrantLockwill be used instead- See Also:
-
DefaultDomain
Creates a newDefaultDomainwhose usage type is determined by the arguments supplied to this constructor.- Parameters:
pe- aProcessingEnvironment; may benullin which case the return value of an invocation ofSupplier.get()on the return value of an invocation ofRuntimeProcessingEnvironmentSupplier.of()will be used insteadlock- aLockto use to serialize symbol completion; ifnullandpeisnull, then a globalReentrantLockwill be used instead; ifnullandpeis non-null, then no serialization of symbol completion will occur and thisDefaultDomainwill not be safe for concurrent use by multiple threads- See Also:
-
-
Method Details
-
arrayTypeOf
Returns aUniversalTyperepresenting anArrayTypewhose component type is the same as the suppliedTypeMirror.- Specified by:
arrayTypeOfin interfaceDomain- Parameters:
t- aTypeMirrorrepresenting a component type; must not benull- Returns:
- a non-
nullUniversalType - Throws:
NullPointerException- iftisnullIllegalArgumentException- iftis unsuitable for use as a component type- See Also:
-
asMemberOf
Description copied from interface:DomainReturns a non-nullTypeMirrorrepresenting the type of the suppliedElementwhen thatElementis viewed as a member of, or otherwise directly contained by, the suppliedcontainingType.For example, when viewed as a member of the parameterized type
Set<String>, theSet.add(Object)method (represented as anExecutableElement) has a type whose method parameter is of typeString(notString's erasure).- Specified by:
asMemberOfin interfaceDomain- Parameters:
containingType- the containingDeclaredType; must not benulle- the memberElement; must not benull- Returns:
- a non-
nulltype representing the type of the suppliedElementwhen viewed as a member of the suppliedcontainingType; nevernull - See Also:
-
assignable
Description copied from interface:DomainReturnstrueif and only if the suppliedpayload(the first argument) is considered assignable to the suppliedreceiver(the second argument) according to the rules of the Java Language Specification.- Specified by:
assignablein interfaceDomain- Parameters:
payload- theTypeMirrorbeing assigned; must not benullreceiver- theTypeMirrorreceiving the assignment; must not benull- Returns:
trueif and only ifpayloadis assignable toreceiver- See Also:
- External Specifications
-
binaryName
Description copied from interface:Domain- Specified by:
binaryNamein interfaceDomain- Parameters:
e- aTypeElement; must not benull- Returns:
- a non-
nullName - See Also:
- External Specifications
-
bridge
Description copied from interface:DomainReturnstrueif and only if the suppliedExecutableElementrepresents a bridge method.- Specified by:
bridgein interfaceDomain- Parameters:
e- anExecutableElement; must not benull- Returns:
trueif and only if the suppliedExecutableElementrepresents a bridge method- See Also:
- External Specifications
-
capture
Description copied from interface:Domain- Specified by:
capturein interfaceDomain- Parameters:
t- aTypeMirror; must not benull; if not a wildcard type, then it will be returned unchanged- Returns:
- a non-
nullTypeMirrorrepresenting the result of capture conversion applied to the suppliedTypeMirror - See Also:
- External Specifications
-
contains
Description copied from interface:DomainReturnstrueif and only ifcandidateContainercontainscandidate, according to the Java Language Specification, section 4.5.1.- Specified by:
containsin interfaceDomain- Parameters:
t0- the putative containing type; normally a wildcard type; must not benullt1- the putative contained type; must not benull- Returns:
trueif and only ifcandidateContainercontainscandidate, according to the Java Language Specification, section 4.5.1;falseotherwise- External Specifications
-
declaredType
Description copied from interface:DomainA convenience method that returns theDeclaredTypeof aTypeElementthat bears the suppliedcanonicalName, ornullif there is no suchTypeElement(and therefore no suchDeclaredType).- Specified by:
declaredTypein interfaceDomain- Parameters:
canonicalName- a valid canonical name; must not benull- Returns:
- a
DeclaredTypewith aTypeKindofTypeKind.DECLARED, ornull - See Also:
- External Specifications
-
declaredType
Description copied from interface:DomainReturns theDeclaredTypeof the suppliedTypeElementwith the suppliedTypeMirrorarguments (if any), yielding a parameterized type.Given a
TypeElementrepresenting the class namedjava.util.Setand aTypeMirrorrepresenting the type declared byjava.lang.String, for example, this method will return aDeclaredTyperepresenting the parameterized type corresponding tojava.util.Set<java.lang.String>.The number of supplied type arguments must either equal the number of the supplied
TypeElement's formal type parameters, or must be zero. If it is zero, and if the suppliedTypeElementis generic, then the suppliedTypeElement's raw type is returned.If a parameterized type is returned, its
TypeElementmust not be contained within a generic outer class. The parameterized typeOuter<String>.Inner<Number>, for example, may be constructed by first using this method to get the typeOuter<String>, and then invokingDomain.declaredType(DeclaredType, TypeElement, TypeMirror...).- Specified by:
declaredTypein interfaceDomain- Parameters:
typeElement- aTypeElement; must not benulltypeArguments- any type arguments (represented byTypeMirrors); must not benull- Returns:
- a non-
nullDeclaredTypewith aTypeKindofTypeKind.DECLARED - See Also:
- External Specifications
-
declaredType
public UniversalType declaredType(DeclaredType enclosingType, TypeElement typeElement, TypeMirror... typeArguments) Description copied from interface:DomainReturns theDeclaredTypeof the suppliedTypeElementwith the suppliedTypeMirrorarguments (if any), given a containingDeclaredTypeof which it is a member, yielding a parameterized type.Given a
DeclaredTyperepresenting the parameterized type corresponding toOuter<String>(see theDomain.declaredType(TypeElement, TypeMirror...)method), aTypeElementrepresenting the class namedOuter.Innerand aDeclaredTyperepresenting the non-generic class corresponding toNumber, for example, this method will return aDeclaredTyperepresenting the parameterized type corresponding toOuter<String>.Inner<Number>.The number of supplied type arguments must either equal the number of the supplied
TypeElement's formal type parameters, or must be zero. If it is zero, and if the suppliedTypeElementis generic, then the suppliedTypeElement's raw type is returned.- Specified by:
declaredTypein interfaceDomain- Parameters:
enclosingType- aDeclaredTyperepresenting the containing type; must not benulltypeElement- aTypeElement; must not benulltypeArguments- any type arguments (represented byTypeMirrors); must not benull- Returns:
- a non-
nullDeclaredTypewith aTypeKindofTypeKind.DECLARED - See Also:
- External Specifications
-
describeConstable
- Specified by:
describeConstablein interfaceConstable
-
directSupertypes
Description copied from interface:DomainReturns a non-nullListof the direct supertypes of the suppliedTypeMirror, which is normally a declared type.- Specified by:
directSupertypesin interfaceDomain- Parameters:
t- aTypeMirror; must not benull; must not be an executable type, a module type, or a package type- Returns:
- a non-
null, immutableListofTypeMirrors representing the direct supertypes - See Also:
- External Specifications
-
element
Description copied from interface:DomainReturns theElementresponsible for declaring the suppliedTypeMirror, which is most commonly aDeclaredType, aTypeVariable, aNoTypewith aTypeKindofTypeKind.MODULE, or aNoTypewith aTypeKindofTypeKind.PACKAGE, ornullif there is no suchElement.- Specified by:
elementin interfaceDomain- Parameters:
t- aTypeMirror; must not benull- Returns:
- an
Element, ornull - See Also:
-
elementType
Description copied from interface:DomainA convenience method that returns the element type of the suppliedTypeMirror.The element type of an array type is the element type of its component type.
.The element type of every other kind of type is the type itself. Note that the semantics of the prior sentence diverge deliberately, primarily for convenience, from those of the relevant section in the Java Language Specification.
- Specified by:
elementTypein interfaceDomain- Parameters:
t- aTypeMirror; must not benull- Returns:
- the element type of the supplied
TypeMirror; nevernull - External Specifications
-
equals
-
erasure
Description copied from interface:DomainReturns the erasure of the suppliedTypeMirror.- Specified by:
erasurein interfaceDomain- Parameters:
t- theTypeMirrorrepresenting the type whose erasure should be returned; must not benull- Returns:
- the erasure of the supplied
TypeMirror; nevernull - See Also:
- External Specifications
-
executableElement
public UniversalElement executableElement(TypeElement declaringElement, TypeMirror returnType, CharSequence name, TypeMirror... parameterTypes) Description copied from interface:DomainA convenience method that returns anExecutableElementrepresenting the static initializer, constructor or method described by the supplied arguments, ornullif no suchExecutableElementexists.- Specified by:
executableElementin interfaceDomain- Parameters:
declaringElement- aTypeElementrepresenting the class that declares the executable; must not benullreturnType- the return type of the executable; must not benullname- the name of the executable; must not benullparameterTypes-TypeMirrors that represent the executable's parameter types- Returns:
- an
ExecutableElementwith anElementKindofElementKind.CONSTRUCTOR,ElementKind.METHOD, orElementKind.STATIC_INIT, ornull
-
hashCode
-
javaLangObject
Description copied from interface:DomainA convenience method that returns theTypeElementrepresenting the class namedjava.lang.Object.- Specified by:
javaLangObjectin interfaceDomain- Returns:
- a non-
nullTypeElementwhose qualified name is equal tojava.lang.Object - See Also:
-
lock
Returns a non-nullUnlockablethat should be used in atry-with-resources block guarding operations that might cause symbol completion.- Specified by:
lockin interfaceDomain- Returns:
- a non-
nullUnlockable - See Also:
-
moduleElement
Description copied from interface:DomainReturns aModuleElementrepresenting the module named by the suppliedqualifiedName, ornullif there is no suchModuleElement.- Specified by:
moduleElementin interfaceDomain- Parameters:
canonicalName- a name suitable for naming a module; must not benull; may be empty, in which case aModuleElementrepresenting an unnamed module will be returned- Returns:
- a
ModuleElement, ornull - See Also:
- External Specifications
-
name
Description copied from interface:DomainReturns aNamerepresenting the suppliedCharSequence.- Specified by:
namein interfaceDomain- Parameters:
name- aCharSequence; must not benull- Returns:
- a non-
nullNamerepresenting the suppliedDomain.name(java.lang.CharSequence) - See Also:
-
noType
Description copied from interface:DomainReturns aNoTypebearing the suppliedTypeKind, if the suppliedTypeKindis eitherTypeKind.NONEorTypeKind.VOID.- Specified by:
noTypein interfaceDomain- Parameters:
kind- aTypeKind; must be eitherTypeKind.NONEorTypeKind.VOID- Returns:
- a non-
nullNoTypebearing the suppliedTypeKind - See Also:
- External Specifications
-
nullType
Description copied from interface:Domain -
origin
Description copied from interface:Domain- Specified by:
originin interfaceDomain- Parameters:
e- a non-nullElement- Returns:
- a non-
nullElements.Origin - See Also:
-
packageElement
Description copied from interface:DomainReturns aPackageElementrepresenting the package bearing the suppliedcanonicalName, ornullif there is no suchPackageElement.- Specified by:
packageElementin interfaceDomain- Parameters:
canonicalName- a canonical name suitable for naming a package; must not benull; may be empty, in which case aModuleElementrepresenting an unnamed package will be returned- Returns:
- a
PackageElement, ornull - See Also:
- External Specifications
-
packageElement
Description copied from interface:DomainReturns aPackageElementrepresenting the package bearing the suppliedcanonicalNameas seen from the module represented by the suppliedModuleElement, ornullif there is no suchPackageElement.- Specified by:
packageElementin interfaceDomain- Parameters:
asSeenFrom- aModuleElement; must not benullcanonicalName- a canonical name suitable for naming a package; must not benull; may be empty, in which case aModuleElementrepresenting an unnamed package will be returned- Returns:
- a
PackageElement, ornull - See Also:
- External Specifications
-
primitiveType
Description copied from interface:Domain- Specified by:
primitiveTypein interfaceDomain- Parameters:
kind- a primitiveTypeKind; must not benull- Returns:
- a non-
nullPrimitiveTypewith a primitiveTypeKind - See Also:
- External Specifications
-
primitiveType
Description copied from interface:DomainReturns the result of applying unboxing conversion to the (logical)TypeElementbearing the suppliedcanonicalName.- Specified by:
primitiveTypein interfaceDomain- Parameters:
canonicalName- a canonical name of either a primitive type or a so-called "wrapper" type; must not benull- Returns:
- a non-
nullPrimitiveTypewith a primitiveTypeKind - See Also:
- External Specifications
-
primitiveType
Description copied from interface:DomainReturns the result of applying unboxing conversion to the type declared by the suppliedTypeElement.- Specified by:
primitiveTypein interfaceDomain- Parameters:
e- aTypeElement; must not benull- Returns:
- a non-
nullPrimitiveTypewith a primitiveTypeKind - See Also:
- External Specifications
-
primitiveType
Description copied from interface:DomainReturns the result of applying unboxing conversion to the suppliedTypeMirror.- Specified by:
primitiveTypein interfaceDomain- Parameters:
t- aTypeMirror; must not benull- Returns:
- a non-
nullPrimitiveTypewith a primitiveTypeKind - See Also:
- External Specifications
-
rawType
Description copied from interface:DomainA convenience method that returns the raw type corresponding tot, ornulliftis incapable of yielding a raw type.Overrides of this method must conform to the requirements imposed by the relevant section of the relevant version of the Java Language Specification concerning raw types.
- Specified by:
rawTypein interfaceDomain- Parameters:
t- aTypeMirror; must not benull- Returns:
- the raw type corresponding to the supplied
TypeMirror, ornulliftis incapable of yielding a raw type - External Specifications
-
recordComponentElement
Description copied from interface:DomainReturns aRecordComponentElementcorresponding to the suppliedExecutableElement, ornullif there is no suchRecordComponentElement.- Specified by:
recordComponentElementin interfaceDomain- Parameters:
e- anExecutableElementenclosed by a record representing an accessor method; must not benull- Returns:
- a
RecordComponentElementcorresponding to the suppliedExecutableElement, ornull - External Specifications
-
sameType
Description copied from interface:DomainReturnstrueif and only if the two arguments represent the same type.This method differs from the
Types.isSameType(TypeMirror, TypeMirror)method in two ways:- Its arguments may be
null. If both arguments arenull,trueis returned. If only one argument isnull,falseis returned. - If the same Java object reference is passed as both arguments,
trueis returned (even if it has aTypeKindofTypeKind.WILDCARD).
- Specified by:
sameTypein interfaceDomain- Parameters:
t0- the firstTypeMirror; may benullt1- the secondTypeMirror; may benull- Returns:
trueif and only if the two arguments represent the same type;falseotherwise- See Also:
- External Specifications
- Its arguments may be
-
subsignature
Description copied from interface:DomainReturnstrueif and only ifet0is a subsignature ofet1.- Specified by:
subsignaturein interfaceDomain- Parameters:
t0- the firstExecutableType; must not benullt1- the secondExecutableType; must not benull- Returns:
trueif and only ifet0is a subsignature ofet1- See Also:
- External Specifications
-
subtype
Description copied from interface:DomainReturnstrueif and only ifcandidateSubtypeis a subtype ofsupertype.- Specified by:
subtypein interfaceDomain- Parameters:
candidateSubtype- the firstTypeMirror; must not benullcandidateSupertype- the secondTypeMirror; must not benull- Returns:
trueif and only ifcandidateSubtypeis a subtype ofsupertype- See Also:
- External Specifications
-
toString
Description copied from interface:DomainConverts the suppliedCharSequence, which is often aName, into aString, and returns the conversion, locking when appropriate to serialize symbol completion.- Specified by:
toStringin interfaceDomain- Parameters:
name- theCharSequenceto convert; may benullin which casenullwill be returned- Returns:
- a
String, ornullifnamewasnull - See Also:
-
typeElement
Description copied from interface:DomainReturns aTypeElementrepresenting the element bearing the supplied canonical name, ornullif there is no suchTypeElement.- Specified by:
typeElementin interfaceDomain- Parameters:
canonicalName- a valid canonical name; must not benull- Returns:
- a
TypeElement, ornull - See Also:
- External Specifications
-
typeElement
Description copied from interface:DomainReturns aTypeElementrepresenting the element bearing the supplied canonical name, as read or seen from the module represented by the suppliedModuleElement, ornullif there is no suchTypeElement.- Specified by:
typeElementin interfaceDomain- Parameters:
asSeenFrom- aModuleElement; must not benullcanonicalName- a valid canonical name; must not benull- Returns:
- a
TypeElement, ornull - See Also:
- External Specifications
-
typeElement
Description copied from interface:DomainReturns aTypeElementrepresenting the result of applying boxing conversion to the primitive type represented by the suppliedPrimitiveTypeargument.The default implementation of this method calls the
Domain.typeElement(TypeKind)method with the suppliedPrimitiveType's affiliatedTypeKindand returns its result.- Specified by:
typeElementin interfaceDomain- Parameters:
t- aPrimitiveTypewith aTypeKindthat is primitive; must not benull- Returns:
- a non-
nullTypeElementrepresenting the result of applying boxing conversion to the supplied argument - See Also:
- External Specifications
-
typeElement
Description copied from interface:DomainReturns aTypeElementrepresenting the result of applying boxing conversion to the primitive type represented by the suppliedTypeKindargument, if it is primitive.- Specified by:
typeElementin interfaceDomain- Parameters:
primitiveTypeKind- aTypeKindthat is primitive; must not benull- Returns:
- a non-
nullTypeElementrepresenting the result of applying boxing conversion to the supplied argument - See Also:
- External Specifications
-
typeParameterElement
Description copied from interface:DomainReturns theTypeParameterElementcontained by the suppliedParameterizablewhose name is equal to the suppliedname, ornullif there is no suchTypeParameterElement.- Specified by:
typeParameterElementin interfaceDomain- Parameters:
p- aParameterizable; must not benullname- a name valid for a type parameter; must not benull- Returns:
- a
TypeParameterElement, ornull
-
typeVariable
Description copied from interface:DomainA convenience method that returns theTypeVariabledeclared by theTypeParameterElementcontained by the suppliedParameterizablewhose name is equal to the suppliedname, ornullif there is no suchTypeParameterElementorTypeVariable.- Specified by:
typeVariablein interfaceDomain- Parameters:
p- aParameterizable; must not benullname- a name valid for a type parameter; must not benull- Returns:
- a
TypeVariable, ornull - See Also:
-
variableElement
Description copied from interface:DomainA convenience method that returns the firstVariableElementwith a variableElementKindand bearing the suppliedsimpleNamethat the suppliedenclosingElementencloses, ornullif there is no suchVariableElement.- Specified by:
variableElementin interfaceDomain- Parameters:
e- anElement; must not benullname- aCharSequence; must not benull- Returns:
- a
VariableElement, ornull - See Also:
-
wildcardType
Description copied from interface:DomainA convenience method that returns a newWildcardTypewith aTypeKindofTypeKind.WILDCARD, an extends bound ofnull, and a super bound ofnull.- Specified by:
wildcardTypein interfaceDomain- Returns:
- a new, non-
nullWildcardType - See Also:
- External Specifications
-
wildcardType
Description copied from interface:DomainReturns a newWildcardTypewith aTypeKindofTypeKind.WILDCARD, an extends bound of the suppliedextendsBound, and a super bound of the suppliedsuperBound.Any argument may be
null. Both arguments may not be non-null.- Specified by:
wildcardTypein interfaceDomain- Parameters:
extendsBound- the upper bound of the newWildcardType; may benullsuperBound- the lower bound of the newWildcardType; may benull- Returns:
- a new, non-
nullWildcardType - See Also:
- External Specifications
-