java.lang.Object
java.lang.Record
cs1302.tracer.api.TraceClassPath.GlobEntry
- Record Components:
root- Search directory, relative to the preparation-time working directory when relative.glob- Portable root-relative pattern.
- All Implemented Interfaces:
TraceClassPath.Entry
- Enclosing class:
TraceClassPath
@API(status=STABLE,
since="4.1.0")
public static record TraceClassPath.GlobEntry(Path root, String glob)
extends Record
implements TraceClassPath.Entry
A portable, case-sensitive pattern selecting regular files below an explicit root.
Patterns use forward-slash separators, ordinary wildcards, character classes, non-nested brace
alternatives, and whole-component
** for zero or more directory levels. Backslash escapes
metacharacters. Absolute patterns, dot components, and empty components are invalid.
Each selection is sorted by its encountered root-relative paths and inserted at its original
position. A selection with no matches fails during preparation.
The complete pattern grammar is shared with
SourceBundle.Builder.addFiles(Path, String, boolean); this selection reads no files
until a tracing or discovery operation uses it.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.glob()Returns the value of theglobrecord component.final inthashCode()Returns a hash code value for this object.root()Returns the value of therootrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
GlobEntry
Validates required values and pattern syntax without accessing the filesystem.- Parameters:
root- Search directory.glob- Portable root-relative pattern.- Throws:
NullPointerException- If either argument is null.IllegalArgumentException- If the pattern is malformed.
-
-
Method Details
-
toString
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. -
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). -
root
Returns the value of therootrecord component.- Returns:
- the value of the
rootrecord component
-
glob
Returns the value of theglobrecord component.- Returns:
- the value of the
globrecord component
-