Record Class AgiClassSource
java.lang.Object
java.lang.Record
uno.anahata.asi.toolkit.java.AgiClassSource
- Record Components:
fqn- The fully qualified class name (e.g."com.foo.Bar").sourceCode- The complete Java source code of the class.
- All Implemented Interfaces:
Displayable
public record AgiClassSource(@NonNull String fqn, @NonNull String sourceCode)
extends Record
implements Displayable
Immutable source code descriptor for an in-memory Java class.
Binds a fully qualified class name (FQN) to its complete Java source code. Used for batch compilation of modular architectures and circular dependencies.
- Author:
- anahata
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final @NonNull StringThe field for thefqnrecord component.private final @NonNull StringThe field for thesourceCoderecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAgiClassSource(@NonNull String fqn, @NonNull String sourceCode) Canonical constructor validating that FQN and sourceCode are non-null and trimmed. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NonNull Stringfqn()Returns the value of thefqnrecord component.Returns the human-readable display value representing this entity in UI views.intCalculates the number of lines in the source code.final inthashCode()Returns a hash code value for this object.@NonNull StringReturns the value of thesourceCoderecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
fqn
-
sourceCode
The field for thesourceCoderecord component.
-
-
Constructor Details
-
AgiClassSource
-
-
Method Details
-
getLineCount
public int getLineCount()Calculates the number of lines in the source code.- Returns:
- Total line count.
-
getDisplayValue
Returns the human-readable display value representing this entity in UI views.Returns the simple class name (the portion of
fqnafter the last dot) for concise UI tab headers and displays.- Specified by:
getDisplayValuein interfaceDisplayable- Returns:
- The display string.
-
toString
-
hashCode
-
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). -
fqn
-
sourceCode
Returns the value of thesourceCoderecord component.- Returns:
- the value of the
sourceCoderecord component
-

