com.badlogic.gdx.utils.Json.getClass()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(2.5k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中com.badlogic.gdx.utils.Json.getClass()方法的一些代码示例,展示了Json.getClass()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Json.getClass()方法的具体详情如下:
包路径:com.badlogic.gdx.utils.Json
类名称:Json
方法名:getClass

Json.getClass介绍

[英]Returns the class for the specified tag, or null.
[中]返回指定标记的类,或null。

代码示例

代码示例来源:origin: libgdx/libgdx

public Skin read (Json json, JsonValue typeToValueMap, Class ignored) {
  for (JsonValue valueMap = typeToValueMap.child; valueMap != null; valueMap = valueMap.next) {
    try {
      Class type = json.getClass(valueMap.name());
      if (type == null) type = ClassReflection.forName(valueMap.name());
      readNamedObjects(json, type, valueMap);
    } catch (ReflectionException ex) {
      throw new SerializationException(ex);
    }
  }
  return skin;
}

代码示例来源:origin: libgdx/libgdx

public Skin read (Json json, JsonValue typeToValueMap, Class ignored) {
  for (JsonValue valueMap = typeToValueMap.child; valueMap != null; valueMap = valueMap.next) {
    try {
      Class type = json.getClass(valueMap.name());
      if (type == null) type = ClassReflection.forName(valueMap.name());
      readNamedObjects(json, type, valueMap);
    } catch (ReflectionException ex) {
      throw new SerializationException(ex);
    }
  }
  return skin;
}

代码示例来源:origin: libgdx/libgdx

String className = typeName == null ? null : jsonData.getString(typeName, null);
if (className != null) {
  type = getClass(className);
  if (type == null) {
    try {

代码示例来源:origin: libgdx/libgdx

String className = typeName == null ? null : jsonData.getString(typeName, null);
if (className != null) {
  type = getClass(className);
  if (type == null) {
    try {

代码示例来源:origin: com.badlogicgames.gdx/gdx

public Skin read (Json json, JsonValue typeToValueMap, Class ignored) {
  for (JsonValue valueMap = typeToValueMap.child; valueMap != null; valueMap = valueMap.next) {
    try {
      Class type = json.getClass(valueMap.name());
      if (type == null) type = ClassReflection.forName(valueMap.name());
      readNamedObjects(json, type, valueMap);
    } catch (ReflectionException ex) {
      throw new SerializationException(ex);
    }
  }
  return skin;
}

代码示例来源:origin: bladecoder/bladecoder-adventure-engine

@Override
public Skin read(Json json, JsonValue typeToValueMap, @SuppressWarnings("rawtypes") Class ignored) {
  for (JsonValue valueMap = typeToValueMap.child; valueMap != null; valueMap = valueMap.next) {
    try {
      Class<?> type = json.getClass(valueMap.name());
      if (type == null)
        type = ClassReflection.forName(valueMap.name());
      readNamedObjects(json, type, valueMap);
    } catch (ReflectionException ex) {
      throw new SerializationException(ex);
    }
  }
  return skin;
}

代码示例来源:origin: com.badlogicgames.gdx/gdx

String className = typeName == null ? null : jsonData.getString(typeName, null);
if (className != null) {
  type = getClass(className);
  if (type == null) {
    try {

相关文章