Record Class ClassScanningIndex
java.lang.Object
java.lang.Record
org.daiitech.naftah.utils.reflect.ClassScanningIndex
- Record Components:
classNames- set of fully qualified class names available in the runtimeclassQualifiers- set of simplified or alternative class identifiers used for lookuparabicClassQualifiers- mapping of Arabic-transliterated identifiers to canonical class namesbuiltinFunctions- array of precomputed built-in function metadata descriptors
public record ClassScanningIndex(Set<String> classNames, Set<String> classQualifiers, Map<String,String> arabicClassQualifiers, BuiltinFunctionInfo[] builtinFunctions)
extends Record
Precomputed lightweight runtime index used for fast class and built-in function resolution.
This record represents a serialized subset of the full ClassScanningResult,
optimized for fast startup and minimal memory footprint. It is primarily used in
environments where full classpath scanning is too expensive (e.g., browser-based
or embedded Naftah Playground runtimes).
The index contains only essential metadata required for lookup operations:
- Available class names
- Class qualifiers (human-readable or alias names)
- Arabic-transliterated class name mappings
- Built-in function metadata (without reflective resolution)
This structure is intentionally immutable and designed for fast deserialization and lookup, not for direct execution or reflection.
- Author:
- Chakib Daii
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thearabicClassQualifiersrecord component.private final BuiltinFunctionInfo[]The field for thebuiltinFunctionsrecord component.The field for theclassNamesrecord component.The field for theclassQualifiersrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionClassScanningIndex(Set<String> classNames, Set<String> classQualifiers, Map<String, String> arabicClassQualifiers, BuiltinFunctionInfo[] builtinFunctions) Creates an instance of aClassScanningIndexrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thearabicClassQualifiersrecord component.Returns the value of thebuiltinFunctionsrecord component.Returns the value of theclassNamesrecord component.Returns the value of theclassQualifiersrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a lightweight identity-based string representation.
-
Field Details
-
classNames
The field for theclassNamesrecord component. -
classQualifiers
The field for theclassQualifiersrecord component. -
arabicClassQualifiers
The field for thearabicClassQualifiersrecord component. -
builtinFunctions
The field for thebuiltinFunctionsrecord component.
-
-
Constructor Details
-
ClassScanningIndex
public ClassScanningIndex(Set<String> classNames, Set<String> classQualifiers, Map<String, String> arabicClassQualifiers, BuiltinFunctionInfo[] builtinFunctions) Creates an instance of aClassScanningIndexrecord class.- Parameters:
classNames- the value for theclassNamesrecord componentclassQualifiers- the value for theclassQualifiersrecord componentarabicClassQualifiers- the value for thearabicClassQualifiersrecord componentbuiltinFunctions- the value for thebuiltinFunctionsrecord component
-
-
Method Details
-
toString
Returns a lightweight identity-based string representation.This intentionally does not print internal data to avoid large log output and to keep debugging output stable across builds.
-
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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. All components in this record class are compared withObjects::equals(Object,Object). -
classNames
Returns the value of theclassNamesrecord component.- Returns:
- the value of the
classNamesrecord component
-
classQualifiers
Returns the value of theclassQualifiersrecord component.- Returns:
- the value of the
classQualifiersrecord component
-
arabicClassQualifiers
Returns the value of thearabicClassQualifiersrecord component.- Returns:
- the value of the
arabicClassQualifiersrecord component
-
builtinFunctions
Returns the value of thebuiltinFunctionsrecord component.- Returns:
- the value of the
builtinFunctionsrecord component
-