Package io.determann.shadow.impl.shadow
Class RecordComponentImpl
java.lang.Object
io.determann.shadow.impl.shadow.ShadowImpl<TypeMirror>
io.determann.shadow.impl.shadow.RecordComponentImpl
- All Implemented Interfaces:
Annotationable<RecordComponentElement>,ApiHolder,ElementBacked<RecordComponentElement>,MirrorBacked<TypeMirror>,Modifiable,RecordComponent,Shadow<TypeMirror>
-
Constructor Summary
ConstructorsConstructorDescriptionRecordComponentImpl(ShadowApi shadowApi, RecordComponentElement recordComponentElement) -
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()inthashCode()booleanisAssignableFrom(Shadow<? extends TypeMirror> shadow) Equivalent toRecordComponent.isSubtypeOf(Shadow)except for primitives.booleanisSubtypeOf(Shadow<? extends TypeMirror> shadow) returns true if this can be cast to that.toString()Methods inherited from class io.determann.shadow.impl.shadow.ShadowImpl
getApi, getMirror, isTypeKind, representsSameTypeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods 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
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, isTypeKind, representsSameType
-
Constructor Details
-
RecordComponentImpl
-
-
Method Details
-
isSubtypeOf
Description copied from interface:RecordComponentreturns 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())- Specified by:
isSubtypeOfin interfaceRecordComponent
-
isAssignableFrom
Description copied from interface:RecordComponentEquivalent toRecordComponent.isSubtypeOf(Shadow)except for primitives. if one is a primitive and the other is not it tries to convert them- Specified by:
isAssignableFromin interfaceRecordComponent
-
getRecord
Description copied from interface:RecordComponentreturns the record this is a port of- Specified by:
getRecordin interfaceRecordComponent
-
getType
- Specified by:
getTypein interfaceRecordComponent
-
getGetter
- Specified by:
getGetterin interfaceRecordComponent
-
getPackage
- Specified by:
getPackagein interfaceRecordComponent
-
erasure
Description copied from interface:RecordComponentInformation 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){}- Specified by:
erasurein interfaceRecordComponent
-
getElement
- Specified by:
getElementin interfaceElementBacked<RecordComponentElement>
-
getTypeKind
- Specified by:
getTypeKindin interfaceShadow<TypeMirror>
-
toString
- Overrides:
toStringin classShadowImpl<TypeMirror>
-
hashCode
public int hashCode() -
equals
Description copied from interface:RecordComponentbe careful using this equals- Specified by:
equalsin interfaceRecordComponent- Specified by:
equalsin interfaceShadow<TypeMirror>- Overrides:
equalsin classObject- See Also:
-