Interface RecordHelper
- All Known Implementing Classes:
RecordHelperImpl
Helper class for working with
java.lang.Record
classes.
This interface has different implementations depending on Java version.- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescriptionOptional<Constructor<?>>
getCanonicalConstructor
(Class<?> recordClass) Returns the canonical constructor for the given record class.boolean
Checks whether given class is ajava.lang.Record
.
-
Method Details
-
isRecord
Checks whether given class is ajava.lang.Record
.- Parameters:
klass
- to check- Returns:
true
class is a record,false
otherwise- Since:
- 1.5.0
-
getCanonicalConstructor
Returns the canonical constructor for the given record class.- Parameters:
recordClass
- to return canonical constructor for- Returns:
- canonical constructor or an empty result if not found
- Since:
- 1.5.0
-