Record Class ResourceConfig.Pattern

java.lang.Object
java.lang.Record
cloud.opencode.base.classloader.graalvm.ResourceConfig.Pattern
Record Components:
pattern - resource glob pattern | 资源匹配模式
Enclosing class:
ResourceConfig

public static record ResourceConfig.Pattern(String pattern) extends Record
Resource pattern entry 资源模式条目
Since:
JDK 25, opencode-base-classloader V1.0.3
Author:
Leon Soo www.LeonSoo.com
  • Constructor Summary

    Constructors
    Constructor
    Description
    Pattern(String pattern)
    Compact constructor with validation 带验证的紧凑构造器
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the pattern record component.
    Convert to JSON object string 转换为 JSON 对象字符串
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Pattern

      public Pattern(String pattern)
      Compact constructor with validation 带验证的紧凑构造器
      Throws:
      NullPointerException - if pattern is null | 如果 pattern 为 null 抛出异常
  • Method Details

    • toJson

      public String toJson()
      Convert to JSON object string 转换为 JSON 对象字符串
      Returns:
      JSON object string | JSON 对象字符串
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • pattern

      public String pattern()
      Returns the value of the pattern record component.
      Returns:
      the value of the pattern record component