com.alibaba.fastjson.annotation.JSONField.name()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(106)

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

JSONField.name介绍

暂无

代码示例

代码示例来源:origin: alibaba/fastjson

parserFeatures = Feature.of(fieldAnnotation.parseFeatures());
if (fieldAnnotation.name().length() != 0) {
  propertyName = fieldAnnotation.name();

代码示例来源:origin: alibaba/fastjson

String fieldAnnotationName = fieldAnnotation.name();
if (fieldAnnotationName.length() > 0) {
  creatorConstructorParameters[i] = fieldAnnotationName;

代码示例来源:origin: com.alibaba/fastjson

jsonField = field.getAnnotation(JSONField.class);
if (jsonField != null) {
  String jsonFieldName = jsonField.name();
  if (jsonFieldName != null && jsonFieldName.length() > 0) {
    name = jsonFieldName;

代码示例来源:origin: com.alibaba/fastjson

JSONField annotation = method.getAnnotation(JSONField.class);
if (annotation != null) {
  if (annotation.name().length() != 0) {
    name = annotation.name();
JSONField annotation = method.getAnnotation(JSONField.class);
if (annotation != null) {
  if (annotation.name().length() != 0) {
    name = annotation.name();

代码示例来源:origin: com.alibaba/fastjson

if (annotations[j] instanceof JSONField) {
  JSONField jsonField = (JSONField) annotations[j];
  String fieldName = jsonField.name();
  if (fieldName != null && fieldName.length() > 0) {
    parameterNames[i] = fieldName;

代码示例来源:origin: com.alibaba/fastjson

parserFeatures = Feature.of(fieldAnnotation.parseFeatures());
if (fieldAnnotation.name().length() != 0) {
  propertyName = fieldAnnotation.name();

代码示例来源:origin: com.alibaba/fastjson

String fieldAnnotationName = fieldAnnotation.name();
if (fieldAnnotationName.length() > 0) {
  creatorConstructorParameters[i] = fieldAnnotationName;

代码示例来源:origin: com.alibaba/fastjson

serialzeFeatures = SerializerFeature.of(fieldAnnotation.serialzeFeatures());
parserFeatures = Feature.of(fieldAnnotation.parseFeatures());
if(fieldAnnotation.name().length() != 0){
  propertyName = fieldAnnotation.name();

代码示例来源:origin: alibaba/fastjson

int ordinal = 0, serialzeFeatures = 0, parserFeatures = 0;
    if (fieldAnnotation != null) {
      field = TypeUtils.getField(clazz, fieldAnnotation.name(), declaredFields);
      ordinal = fieldAnnotation.ordinal();
      serialzeFeatures = SerializerFeature.of(fieldAnnotation.serialzeFeatures());
      parserFeatures = Feature.of(fieldAnnotation.parseFeatures());
      fieldName = fieldAnnotation.name();
      fieldName = fieldAnnotation.name();
      ordinal = fieldAnnotation.ordinal();
      serialzeFeatures = SerializerFeature.of(fieldAnnotation.serialzeFeatures());
      String nameAnnotated = fieldAnnotation.name();
      if (nameAnnotated.length() != 0) {
        paramName = nameAnnotated;
  if (annotation.name().length() != 0) {
    String propertyName = annotation.name();
    add(fieldList, new FieldInfo(propertyName, method, null, clazz, type, ordinal, serialzeFeatures, parserFeatures,
        annotation, null, null));
if (annotation.name().length() != 0) {
  String propertyName = annotation.name();
  add(fieldList, new FieldInfo(propertyName, method, null, clazz, type, ordinal, serialzeFeatures, parserFeatures,
      annotation, null, null));
  if (fieldAnnotation.name().length() != 0) {
    propertyName = fieldAnnotation.name();
    add(fieldList, new FieldInfo(propertyName, method, field, clazz, type, ordinal,

代码示例来源:origin: com.alibaba/fastjson

serialzeFeatures = SerializerFeature.of(annotation.serialzeFeatures());
parserFeatures = Feature.of(annotation.parseFeatures());
if(annotation.name().length() != 0){
  String propertyName = annotation.name();
  if(aliasMap != null){
    propertyName = aliasMap.get(propertyName);
    serialzeFeatures = SerializerFeature.of(fieldAnnotation.serialzeFeatures());
    parserFeatures = Feature.of(fieldAnnotation.parseFeatures());
    if(fieldAnnotation.name().length() != 0){
      fieldAnnotationAndNameExists = true;
      propertyName = fieldAnnotation.name();
      if(aliasMap != null){
        propertyName = aliasMap.get(propertyName);
    serialzeFeatures = SerializerFeature.of(fieldAnnotation.serialzeFeatures());
    parserFeatures = Feature.of(fieldAnnotation.parseFeatures());
    if(fieldAnnotation.name().length() != 0){
      propertyName = fieldAnnotation.name();
      if(aliasMap != null){
        propertyName = aliasMap.get(propertyName);

代码示例来源:origin: com.alibaba/fastjson

&& ((!ASMUtils.checkName(annotation.name())) //
  || annotation.format().length() != 0 //
  || annotation.deserializeUsing() != Void.class //

代码示例来源:origin: com.alibaba/fastjson

int ordinal = 0, serialzeFeatures = 0, parserFeatures = 0;
    if (fieldAnnotation != null) {
      field = TypeUtils.getField(clazz, fieldAnnotation.name(), declaredFields);
      ordinal = fieldAnnotation.ordinal();
      serialzeFeatures = SerializerFeature.of(fieldAnnotation.serialzeFeatures());
      parserFeatures = Feature.of(fieldAnnotation.parseFeatures());
      fieldName = fieldAnnotation.name();
      fieldName = fieldAnnotation.name();
      ordinal = fieldAnnotation.ordinal();
      serialzeFeatures = SerializerFeature.of(fieldAnnotation.serialzeFeatures());
      String nameAnnotated = fieldAnnotation.name();
      if (nameAnnotated.length() != 0) {
        paramName = nameAnnotated;
  if (annotation.name().length() != 0) {
    String propertyName = annotation.name();
    add(fieldList, new FieldInfo(propertyName, method, null, clazz, type, ordinal, serialzeFeatures, parserFeatures,
        annotation, null, null));
if (annotation.name().length() != 0) {
  String propertyName = annotation.name();
  add(fieldList, new FieldInfo(propertyName, method, null, clazz, type, ordinal, serialzeFeatures, parserFeatures,
      annotation, null, null));
  if (fieldAnnotation.name().length() != 0) {
    propertyName = fieldAnnotation.name();
    add(fieldList, new FieldInfo(propertyName, method, field, clazz, type, ordinal,

代码示例来源:origin: com.alibaba/fastjson

if ((!ASMUtils.checkName(annotation.name())) //
    || annotation.jsonDirect()
    || annotation.serializeUsing() != Void.class

代码示例来源:origin: foxinmy/weixin4j

jsonField = field.getAnnotation(JSONField.class);
if (jsonField != null
    && StringUtil.isNotBlank(jsonField.name())) {
  result.remove(jsonField.name());
} else {
  result.remove(field.getName());

代码示例来源:origin: AlibabaTech/fastjson

JSONField annotation = method.getAnnotation(JSONField.class);
if (annotation != null) {
  if (annotation.name().length() != 0) {
    name = annotation.name();
JSONField annotation = method.getAnnotation(JSONField.class);
if (annotation != null) {
  if (annotation.name().length() != 0) {
    name = annotation.name();

代码示例来源:origin: com.foxinmy/weixin4j-base

jsonField = field.getAnnotation(JSONField.class);
if (jsonField != null
    && StringUtil.isNotBlank(jsonField.name())) {
  result.remove(jsonField.name());
} else {
  result.remove(field.getName());

代码示例来源:origin: AlibabaTech/fastjson

if (annotation.name().length() != 0) {
  String propertyName = annotation.name();
  JSONField fieldAnnotation = field.getAnnotation(JSONField.class);
  if (fieldAnnotation != null && fieldAnnotation.name().length() != 0) {
    propertyName = fieldAnnotation.name();
  JSONField fieldAnnotation = field.getAnnotation(JSONField.class);
  if (fieldAnnotation != null && fieldAnnotation.name().length() != 0) {
    propertyName = fieldAnnotation.name();

代码示例来源:origin: AlibabaTech/fastjson

Field field = getField(clazz, fieldAnnotation.name());
  if (field != null) {
    field.setAccessible(true);
  FieldInfo fieldInfo = new FieldInfo(fieldAnnotation.name(), clazz, fieldClass, fieldType, null,
                    field);
  beanInfo.add(fieldInfo);
  Field field = getField(clazz, fieldAnnotation.name());
  if (field != null) {
    field.setAccessible(true);
  FieldInfo fieldInfo = new FieldInfo(fieldAnnotation.name(), clazz, fieldClass, fieldType, null,
                    field);
  beanInfo.add(fieldInfo);
if (annotation.name().length() != 0) {
  String propertyName = annotation.name();
  beanInfo.add(new FieldInfo(propertyName, method, null, clazz, type));
  method.setAccessible(true);
  if (fieldAnnotation != null && fieldAnnotation.name().length() != 0) {
    propertyName = fieldAnnotation.name();

相关文章

微信公众号

最新文章

更多