Class RtagMirror

java.lang.Object
com.saicone.rtag.RtagMirror
Direct Known Subclasses:
Rtag

public class RtagMirror extends Object

RtagMirror class to convert objects.
By default, it's only compatible with regular Java objects like String, Short, Integer, Double, Float, Long, Byte, Map and List.
It also converts Byte, Integer and Long arrays as well.

  • Field Details

    • TAG_BASE

      protected static final Class<?> TAG_BASE
      Tag class object.
    • TAG_COMPOUND

      protected static final Class<?> TAG_COMPOUND
      CompoundTag class object.
    • TAG_LIST

      protected static final Class<?> TAG_LIST
      ListTag class object.
    • INSTANCE

      public static final RtagMirror INSTANCE
      RtagMirror public instance only compatible with regular Java objects.
  • Constructor Details

  • Method Details

    • getRtag

      @ScheduledForRemoval(inVersion="1.6.0") @Deprecated public Rtag getRtag()
      Deprecated.
      Rtag extends RtagMirror.
      Get the current object if it is and instance of Rtag.
      Returns:
      the current Rtag instance or null.
    • setRtag

      @ScheduledForRemoval(inVersion="1.6.0") @Deprecated public void setRtag(Rtag rtag)
      Deprecated.
      Rtag extends RtagMirror.
      Ignored method to set Rtag instance.
      Parameters:
      rtag - Ignored Rtag instance.
    • newTag

      public Object newTag(Object object)
      Convert any object to tag object.
      Parameters:
      object - Object to convert.
      Returns:
      the object as its tag representation or null.
    • clone

      public Object clone(Object tag)
      Copy any Tag object into new one.
      Parameters:
      tag - Tag to copy.
      Returns:
      A tag object with the same value.
    • getTagValue

      public Object getTagValue(Object tag)
      Convert any tag object to regular Java object.
      Parameters:
      tag - Tag to convert.
      Returns:
      Converted object.