Package io.determann.shadow.api.shadow
Interface Variable<SURROUNDING extends Shadow<? extends TypeMirror>>
- All Superinterfaces:
Annotationable<VariableElement>,ApiHolder,ElementBacked<VariableElement>,MirrorBacked<TypeMirror>,Modifiable,Shadow<TypeMirror>
- All Known Subinterfaces:
EnumConstant,Field,Parameter
- All Known Implementing Classes:
EnumConstantImpl,FieldImpl,ParameterImpl,VariableImpl
public interface Variable<SURROUNDING extends Shadow<? extends TypeMirror>>
extends Shadow<TypeMirror>, Annotationable<VariableElement>
Can be converted using
ShadowApi.convert(Variable)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbe careful using this equalsgetType()booleanisAssignableFrom(Shadow<? extends TypeMirror> shadow) Equivalent toisSubtypeOf(Shadow)except for primitives.booleanisSubtypeOf(Shadow<? extends TypeMirror> shadow) returns true if this can be cast to that.Methods inherited from interface io.determann.shadow.api.Annotationable
getAnnotationUsages, getDirectAnnotationUsages, getDirectUsageOf, getDirectUsageOfOrThrow, getDirectUsagesOf, getUsageOf, getUsageOfOrThrow, getUsagesOf, isAnnotatedWith, isDirectlyAnnotatedWithMethods inherited from interface io.determann.shadow.api.ElementBacked
getElement, getJavaDoc, getModifiers, getModule, getSimpleName, logError, logInfo, logWarningMethods inherited from interface io.determann.shadow.api.modifier.Modifiable
hasModifierMethods inherited from interface io.determann.shadow.api.shadow.Shadow
getApi, getMirror, getTypeKind, isTypeKind, representsSameType
-
Method Details
-
isSubtypeOf
returns true if this can be cast to that. This can be useful if you want to check if a shadow implements for example aCollectionshadowToTest.erasure().isSubtypeOf(shadowApi.getDeclaredOrThrow("java.util.Collection").erasure()) -
isAssignableFrom
Equivalent toisSubtypeOf(Shadow)except for primitives. if one is a primitive and the other is not it tries to convert them -
getType
Shadow<TypeMirror> getType() -
getPackage
Package getPackage() -
getSurrounding
SURROUNDING getSurrounding() -
equals
be careful using this equals- Specified by:
equalsin interfaceShadow<SURROUNDING extends Shadow<? extends TypeMirror>>- Overrides:
equalsin classObject- See Also:
-