Package io.determann.shadow.api.shadow
Interface RecordComponent
- All Superinterfaces:
Annotationable<RecordComponentElement>,ApiHolder,ElementBacked<RecordComponentElement>,MirrorBacked<TypeMirror>,Modifiable,Shadow<TypeMirror>
- All Known Implementing Classes:
RecordComponentImpl
-
Method Summary
Modifier and TypeMethodDescriptionbooleanbe careful using this equalserasure()Information regarding generics is lost after the compilation.returns the record this is a port ofgetType()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 -
getRecord
Record getRecord()returns the record this is a port of -
getType
Shadow<TypeMirror> getType() -
getGetter
Method getGetter() -
getPackage
Package getPackage() -
erasure
RecordComponent erasure()Information regarding generics is lost after the compilation. For ExampleList<String>becomesList. This method Does the same. This can be useful if you want to check if a shadow implements for exampleCollectionshadowToTest.erasure().isSubtypeOf(shadowApi.getDeclaredOrThrow("java.util.Collection").erasure())for
RecordComponents this means for examplerecord MyRecord<T>(T t){}->record MyRecord<T>(java.lang.Object t){} -
equals
be careful using this equals- Specified by:
equalsin interfaceShadow<TypeMirror>- Overrides:
equalsin classObject- See Also:
-