Record Class ClassLocation

java.lang.Object
java.lang.Record
ortus.boxlang.runtime.loader.ClassLocation
Record Components:
name - The name of the class
path - The fully absolute path to the class
packageName - The package the class belongs to
type - The type of class it is: 1. Box class (this.BX_TYPE), 2. Java class (this.JAVA_TYPE)
clazz - The class object that represents the loaded class
module - The module the class belongs to, null if none
cacheable - If the class is cacheable or not
application - The application the class belongs to, null if none
resolvedFilePath - The resolved file path

public record ClassLocation(String name, String path, String packageName, int type, Class<?> clazz, String module, Boolean cacheable, String application, ResolvedFilePath resolvedFilePath) extends Record
This record represents a class location in the application
  • Constructor Details

    • ClassLocation

      public ClassLocation(String name, String path, String packageName, int type, Class<?> clazz, String module, Boolean cacheable, String application, ResolvedFilePath resolvedFilePath)
      Creates an instance of a ClassLocation record class.
      Parameters:
      name - the value for the name record component
      path - the value for the path record component
      packageName - the value for the packageName record component
      type - the value for the type record component
      clazz - the value for the clazz record component
      module - the value for the module record component
      cacheable - the value for the cacheable record component
      application - the value for the application record component
      resolvedFilePath - the value for the resolvedFilePath record component
  • Method Details

    • isFromModule

      public Boolean isFromModule()
      Verify if the class is from a module
    • clazz

      public Class<?> clazz(IBoxContext context)
      Override the getter Java Classes just return the class BoxLang classes we ask the Loader to load it
    • toString

      public String toString()
      Show the state of this record as a string
      Specified by:
      toString in class Record
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • path

      public String path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • packageName

      public String packageName()
      Returns the value of the packageName record component.
      Returns:
      the value of the packageName record component
    • type

      public int type()
      Returns the value of the type record component.
      Returns:
      the value of the type record component
    • clazz

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

      public String module()
      Returns the value of the module record component.
      Returns:
      the value of the module record component
    • cacheable

      public Boolean cacheable()
      Returns the value of the cacheable record component.
      Returns:
      the value of the cacheable record component
    • application

      public String application()
      Returns the value of the application record component.
      Returns:
      the value of the application record component
    • resolvedFilePath

      public ResolvedFilePath resolvedFilePath()
      Returns the value of the resolvedFilePath record component.
      Returns:
      the value of the resolvedFilePath record component