Package ortus.boxlang.runtime.loader
Record Class ClassLocation
java.lang.Object
java.lang.Record
ortus.boxlang.runtime.loader.ClassLocation
- Record Components:
name- The name of the classpath- The fully absolute path to the classpackageName- The package the class belongs totype- 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 classmodule- The module the class belongs to, null if nonecacheable- If the class is cacheable or notapplication- The application the class belongs to, null if noneresolvedFilePath- 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 Summary
ConstructorsConstructorDescriptionClassLocation(String name, String path, String packageName, int type, Class<?> clazz, String module, Boolean cacheable, String application, ResolvedFilePath resolvedFilePath) Creates an instance of aClassLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theapplicationrecord component.Returns the value of thecacheablerecord component.Class<?> clazz()Returns the value of theclazzrecord component.Class<?> clazz(IBoxContext context) Override the getter Java Classes just return the class BoxLang classes we ask the Loader to load itfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Verify if the class is from a modulemodule()Returns the value of themodulerecord component.name()Returns the value of thenamerecord component.Returns the value of thepackageNamerecord component.path()Returns the value of thepathrecord component.Returns the value of theresolvedFilePathrecord component.toString()Show the state of this record as a stringinttype()Returns the value of thetyperecord component.
-
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 aClassLocationrecord class.- Parameters:
name- the value for thenamerecord componentpath- the value for thepathrecord componentpackageName- the value for thepackageNamerecord componenttype- the value for thetyperecord componentclazz- the value for theclazzrecord componentmodule- the value for themodulerecord componentcacheable- the value for thecacheablerecord componentapplication- the value for theapplicationrecord componentresolvedFilePath- the value for theresolvedFilePathrecord component
-
-
Method Details
-
isFromModule
Verify if the class is from a module -
clazz
Override the getter Java Classes just return the class BoxLang classes we ask the Loader to load it -
toString
Show the state of this record as a string -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
packageName
Returns the value of thepackageNamerecord component.- Returns:
- the value of the
packageNamerecord component
-
type
public int type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
clazz
Returns the value of theclazzrecord component.- Returns:
- the value of the
clazzrecord component
-
module
Returns the value of themodulerecord component.- Returns:
- the value of the
modulerecord component
-
cacheable
Returns the value of thecacheablerecord component.- Returns:
- the value of the
cacheablerecord component
-
application
Returns the value of theapplicationrecord component.- Returns:
- the value of the
applicationrecord component
-
resolvedFilePath
Returns the value of theresolvedFilePathrecord component.- Returns:
- the value of the
resolvedFilePathrecord component
-