Record Class ScannedClass
java.lang.Object
java.lang.Record
org.daiitech.naftah.utils.reflect.ScannedClass
- Record Components:
clazz- the @Classobject representing the classqualifiedName- the fully qualified name of the classisAccessible- whether the class is accessibleisInstantiable- whether the class can be instantiatedjvmFunctions- list of JVM functions available on the classbuiltinFunctions- list of builtin functions available on the class
@Deprecated
public record ScannedClass(Class<?> clazz, String qualifiedName, boolean isAccessible, boolean isInstantiable, List<JvmFunction> jvmFunctions, List<BuiltinFunction> builtinFunctions)
extends Record
Deprecated.
This class is deprecated and may be removed in future versions.
Represents metadata about a scanned Java class.
This record holds information about the class, including its accessibility, instantiability, and lists of JVM and builtin functions associated with it.
- Author:
- Chakib Daii
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<BuiltinFunction>Deprecated.The field for thebuiltinFunctionsrecord component.private final Class<?>Deprecated.The field for theclazzrecord component.private final booleanDeprecated.The field for theisAccessiblerecord component.private final booleanDeprecated.The field for theisInstantiablerecord component.private final List<JvmFunction>Deprecated.The field for thejvmFunctionsrecord component.private final StringDeprecated.The field for thequalifiedNamerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionScannedClass(Class<?> clazz, String qualifiedName, boolean isAccessible, boolean isInstantiable, List<JvmFunction> jvmFunctions, List<BuiltinFunction> builtinFunctions) Deprecated.Creates an instance of aScannedClassrecord class. -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Returns the value of thebuiltinFunctionsrecord component.Class<?>clazz()Deprecated.Returns the value of theclazzrecord component.final booleanDeprecated.Indicates whether some other object is "equal to" this one.final inthashCode()Deprecated.Returns a hash code value for this object.booleanDeprecated.Returns the value of theisAccessiblerecord component.booleanDeprecated.Returns the value of theisInstantiablerecord component.Deprecated.Returns the value of thejvmFunctionsrecord component.static ScannedClassDeprecated.Creates aScannedClassinstance for the given class.static ScannedClassDeprecated.Creates aScannedClassinstance for the given class and qualified name.Deprecated.Returns the value of thequalifiedNamerecord component.static Optional<ScannedClass>Deprecated.Safely creates aScannedClassinstance, returning an empty optional if scanning fails.final StringtoString()Deprecated.Returns a string representation of this record class.
-
Field Details
-
clazz
Deprecated.The field for theclazzrecord component. -
qualifiedName
Deprecated.The field for thequalifiedNamerecord component. -
isAccessible
private final boolean isAccessibleDeprecated.The field for theisAccessiblerecord component. -
isInstantiable
private final boolean isInstantiableDeprecated.The field for theisInstantiablerecord component. -
jvmFunctions
Deprecated.The field for thejvmFunctionsrecord component. -
builtinFunctions
Deprecated.The field for thebuiltinFunctionsrecord component.
-
-
Constructor Details
-
ScannedClass
public ScannedClass(Class<?> clazz, String qualifiedName, boolean isAccessible, boolean isInstantiable, List<JvmFunction> jvmFunctions, List<BuiltinFunction> builtinFunctions) Deprecated.Creates an instance of aScannedClassrecord class.- Parameters:
clazz- the value for theclazzrecord componentqualifiedName- the value for thequalifiedNamerecord componentisAccessible- the value for theisAccessiblerecord componentisInstantiable- the value for theisInstantiablerecord componentjvmFunctions- the value for thejvmFunctionsrecord componentbuiltinFunctions- the value for thebuiltinFunctionsrecord component
-
-
Method Details
-
of
Deprecated.Creates aScannedClassinstance for the given class and qualified name.- Parameters:
clazz- the class to scanqualifiedName- the fully qualified name of the class- Returns:
- a new
ScannedClassinstance
-
of
Deprecated.Creates aScannedClassinstance for the given class.- Parameters:
clazz- the class to scan- Returns:
- a new
ScannedClassinstance
-
safeOf
Deprecated.Safely creates aScannedClassinstance, returning an empty optional if scanning fails.- Parameters:
clazz- the class to scan- Returns:
- an
Optionalcontaining theScannedClassif successful, or empty otherwise
-
toString
Deprecated.Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Deprecated.Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Deprecated.Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
clazz
Deprecated.Returns the value of theclazzrecord component.- Returns:
- the value of the
clazzrecord component
-
qualifiedName
Deprecated.Returns the value of thequalifiedNamerecord component.- Returns:
- the value of the
qualifiedNamerecord component
-
isAccessible
public boolean isAccessible()Deprecated.Returns the value of theisAccessiblerecord component.- Returns:
- the value of the
isAccessiblerecord component
-
isInstantiable
public boolean isInstantiable()Deprecated.Returns the value of theisInstantiablerecord component.- Returns:
- the value of the
isInstantiablerecord component
-
jvmFunctions
Deprecated.Returns the value of thejvmFunctionsrecord component.- Returns:
- the value of the
jvmFunctionsrecord component
-
builtinFunctions
Deprecated.Returns the value of thebuiltinFunctionsrecord component.- Returns:
- the value of the
builtinFunctionsrecord component
-