Module gg.xp.xivapi

Class MappingUtils

java.lang.Object
gg.xp.xivapi.mappers.util.MappingUtils

public final class MappingUtils extends Object
  • Field Details

    • ALL_LANGS

      public static final List<String> ALL_LANGS
  • Method Details

    • getFieldName

      public static String getFieldName(Method method)
      Given a method, determine the name of the XivApi field to use.
      Parameters:
      method - The method
      Returns:
      The name
      Throws:
      XivApiMappingException - if the method neither has an appropriate name nor an appropriate annotation.
    • isArrayQueryType

      public static boolean isArrayQueryType(Class<?> type)
      Check whether a field should have [] suffixed to it in the fields param. i.e. returns true iff the type is a list or array.
      Parameters:
      type - The type to check
      Returns:
      True if list/array.
    • validateAndGetSheetName

      public static String validateAndGetSheetName(Class<?> cls)
    • parameterizedTypeToRawClass

      public static Class<?> parameterizedTypeToRawClass(Type typeOriginal)
    • makeSchemaVersion

      public static XivApiSchemaVersion makeSchemaVersion(String version)
    • methodMapEquals

      public static boolean methodMapEquals(Map<Method,Object> left, Map<Method,Object> right)
    • unknownValueEquals

      public static boolean unknownValueEquals(Object left, Object right)