Class NameProperty

java.lang.Object
com.comphenix.protocol.wrappers.nbt.NameProperty

public abstract class NameProperty extends Object
  • Constructor Details

    • NameProperty

      public NameProperty()
  • Method Details

    • getName

      public abstract String getName()
      Retrieve the name.
      Returns:
      The name.
    • setName

      public abstract void setName(String name)
      Set the name.
      Parameters:
      name - - the new value of the name.
    • hasStringIndex

      public static boolean hasStringIndex(Class<?> baseClass, int index)
      Determine if a string of the given index exists in the base class.
      Parameters:
      baseClass - - the base class.
      index - - the index to check.
      Returns:
      TRUE if it does, FALSE otherwise.
    • fromStringIndex

      public static NameProperty fromStringIndex(Class<?> baseClass, Object target, int index)
      Retrieve a name property that delegates all read and write operations to a field of the given target.
      Parameters:
      baseClass - - the base class.
      target - - the target
      index - - the index of the field.
      Returns:
      The name property.
    • fromBean

      public static NameProperty fromBean()
      Retrieve a new name property around a simple field, forming a Java bean.
      Returns:
      The name property.