Record Class ScannedClass

java.lang.Object
java.lang.Record
org.daiitech.naftah.utils.reflect.ScannedClass
Record Components:
clazz - the @Class object representing the class
qualifiedName - the fully qualified name of the class
isAccessible - whether the class is accessible
isInstantiable - whether the class can be instantiated
jvmFunctions - list of JVM functions available on the class
builtinFunctions - 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 Details

    • clazz

      private final Class<?> clazz
      Deprecated.
      The field for the clazz record component.
    • qualifiedName

      private final String qualifiedName
      Deprecated.
      The field for the qualifiedName record component.
    • isAccessible

      private final boolean isAccessible
      Deprecated.
      The field for the isAccessible record component.
    • isInstantiable

      private final boolean isInstantiable
      Deprecated.
      The field for the isInstantiable record component.
    • jvmFunctions

      private final List<JvmFunction> jvmFunctions
      Deprecated.
      The field for the jvmFunctions record component.
    • builtinFunctions

      private final List<BuiltinFunction> builtinFunctions
      Deprecated.
      The field for the builtinFunctions record 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 a ScannedClass record class.
      Parameters:
      clazz - the value for the clazz record component
      qualifiedName - the value for the qualifiedName record component
      isAccessible - the value for the isAccessible record component
      isInstantiable - the value for the isInstantiable record component
      jvmFunctions - the value for the jvmFunctions record component
      builtinFunctions - the value for the builtinFunctions record component
  • Method Details

    • of

      public static ScannedClass of(Class<?> clazz, String qualifiedName)
      Deprecated.
      Creates a ScannedClass instance for the given class and qualified name.
      Parameters:
      clazz - the class to scan
      qualifiedName - the fully qualified name of the class
      Returns:
      a new ScannedClass instance
    • of

      public static ScannedClass of(Class<?> clazz)
      Deprecated.
      Creates a ScannedClass instance for the given class.
      Parameters:
      clazz - the class to scan
      Returns:
      a new ScannedClass instance
    • safeOf

      public static Optional<ScannedClass> safeOf(Class<?> clazz)
      Deprecated.
      Safely creates a ScannedClass instance, returning an empty optional if scanning fails.
      Parameters:
      clazz - the class to scan
      Returns:
      an Optional containing the ScannedClass if successful, or empty otherwise
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • clazz

      public Class<?> clazz()
      Deprecated.
      Returns the value of the clazz record component.
      Returns:
      the value of the clazz record component
    • qualifiedName

      public String qualifiedName()
      Deprecated.
      Returns the value of the qualifiedName record component.
      Returns:
      the value of the qualifiedName record component
    • isAccessible

      public boolean isAccessible()
      Deprecated.
      Returns the value of the isAccessible record component.
      Returns:
      the value of the isAccessible record component
    • isInstantiable

      public boolean isInstantiable()
      Deprecated.
      Returns the value of the isInstantiable record component.
      Returns:
      the value of the isInstantiable record component
    • jvmFunctions

      public List<JvmFunction> jvmFunctions()
      Deprecated.
      Returns the value of the jvmFunctions record component.
      Returns:
      the value of the jvmFunctions record component
    • builtinFunctions

      public List<BuiltinFunction> builtinFunctions()
      Deprecated.
      Returns the value of the builtinFunctions record component.
      Returns:
      the value of the builtinFunctions record component