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

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

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

Json.readField介绍

暂无

代码示例

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

public void readField (Object object, String name, JsonValue jsonData) {
  readField(object, name, name, null, jsonData);
}

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

public void readField (Object object, String name, Class elementType, JsonValue jsonData) {
  readField(object, name, name, elementType, jsonData);
}

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

public void readField (Object object, String fieldName, String jsonName, JsonValue jsonData) {
  readField(object, fieldName, jsonName, null, jsonData);
}

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

public void readField (Object object, String fieldName, String jsonName, JsonValue jsonData) {
  readField(object, fieldName, jsonName, null, jsonData);
}

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

public void readField (Object object, String name, JsonValue jsonData) {
  readField(object, name, name, null, jsonData);
}

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

public void readField (Object object, String name, Class elementType, JsonValue jsonData) {
  readField(object, name, name, elementType, jsonData);
}

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

/** @param elementType May be null if the type is unknown. */
public void readField (Object object, String fieldName, String jsonName, Class elementType, JsonValue jsonMap) {
  Class type = object.getClass();
  ObjectMap<String, FieldMetadata> fields = getFields(type);
  FieldMetadata metadata = fields.get(fieldName);
  if (metadata == null) throw new SerializationException("Field not found: " + fieldName + " (" + type.getName() + ")");
  Field field = metadata.field;
  if (elementType == null) elementType = metadata.elementType;
  readField(object, field, jsonName, elementType, jsonMap);
}

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

/** @param elementType May be null if the type is unknown. */
public void readField (Object object, String fieldName, String jsonName, Class elementType, JsonValue jsonMap) {
  Class type = object.getClass();
  ObjectMap<String, FieldMetadata> fields = getFields(type);
  FieldMetadata metadata = fields.get(fieldName);
  if (metadata == null) throw new SerializationException("Field not found: " + fieldName + " (" + type.getName() + ")");
  Field field = metadata.field;
  if (elementType == null) elementType = metadata.elementType;
  readField(object, field, jsonName, elementType, jsonMap);
}

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

public void readField (Object object, String name, JsonValue jsonData) {
  readField(object, name, name, null, jsonData);
}

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

public void readField (Object object, String name, Class elementType, JsonValue jsonData) {
  readField(object, name, name, elementType, jsonData);
}

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

public void readField (Object object, String fieldName, String jsonName, JsonValue jsonData) {
  readField(object, fieldName, jsonName, null, jsonData);
}

代码示例来源:origin: junkdog/artemis-odb

private SaveFileFormat partialLoad(JsonValue jsonMap) {
  SaveFileFormat save = new SaveFileFormat((IntBag)null);
  json.readField(save, "componentIdentifiers", jsonMap);
  transmuterEntrySerializer.identifiers = save.componentIdentifiers;
  json.readField(save, "archetypes", jsonMap);
  entitySerializer.archetypeMapper = save.archetypes;
  entitySerializer.serializationState = save;
  if (entitySerializer.archetypeMapper != null) {
    entitySerializer.archetypeMapper.serializationState = save;
    transmuterEntrySerializer.identifiers = save.componentIdentifiers;
  }
  return save;
}

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

/** @param elementType May be null if the type is unknown. */
public void readField (Object object, String fieldName, String jsonName, Class elementType, JsonValue jsonMap) {
  Class type = object.getClass();
  ObjectMap<String, FieldMetadata> fields = getFields(type);
  FieldMetadata metadata = fields.get(fieldName);
  if (metadata == null) throw new SerializationException("Field not found: " + fieldName + " (" + type.getName() + ")");
  Field field = metadata.field;
  if (elementType == null) elementType = metadata.elementType;
  readField(object, field, jsonName, elementType, jsonMap);
}

相关文章