本文整理汇总了Java中org.codehaus.jackson.map.introspect.AnnotatedField类的典型用法代码示例。如果您正苦于以下问题:Java AnnotatedField类的具体用法?Java AnnotatedField怎么用?Java AnnotatedField使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
AnnotatedField类属于org.codehaus.jackson.map.introspect包,在下文中一共展示了AnnotatedField类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: addReferenceProperties
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
protected void addReferenceProperties(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanDeserializerBuilder paramBeanDeserializerBuilder)
throws JsonMappingException
{
Map localMap = paramBasicBeanDescription.findBackReferenceProperties();
if (localMap != null)
{
Iterator localIterator = localMap.entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
String str = (String)localEntry.getKey();
AnnotatedMember localAnnotatedMember = (AnnotatedMember)localEntry.getValue();
if ((localAnnotatedMember instanceof AnnotatedMethod))
{
paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedMethod)localAnnotatedMember));
continue;
}
paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedField)localAnnotatedMember));
}
}
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:22,代码来源:BeanDeserializerFactory.java
示例2: constructSettableProperty
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedField paramAnnotatedField)
throws JsonMappingException
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
paramAnnotatedField.fixAccess();
JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedField.getGenericType());
BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedField, localStd);
if (localJavaType2 != localJavaType1)
localStd = localStd.withType(localJavaType2);
JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedField, localStd);
JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedField, localJavaType2, paramString);
SettableBeanProperty.FieldProperty localFieldProperty = new SettableBeanProperty.FieldProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
if (localJsonDeserializer != null)
localFieldProperty.setValueDeserializer(localJsonDeserializer);
AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedField);
if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
localFieldProperty.setManagedReferenceName(localReferenceProperty.getName());
return localFieldProperty;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:21,代码来源:BeanDeserializerFactory.java
示例3: findDeserializablePropertyName
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField)
{
String str1 = this._primary.findDeserializablePropertyName(paramAnnotatedField);
if (str1 == null)
str1 = this._secondary.findDeserializablePropertyName(paramAnnotatedField);
String str2;
do
{
do
return str1;
while (str1.length() != 0);
str2 = this._secondary.findDeserializablePropertyName(paramAnnotatedField);
}
while (str2 == null);
return str2;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:AnnotationIntrospector.java
示例4: findSerializablePropertyName
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public String findSerializablePropertyName(AnnotatedField paramAnnotatedField)
{
String str1 = this._primary.findSerializablePropertyName(paramAnnotatedField);
if (str1 == null)
str1 = this._secondary.findSerializablePropertyName(paramAnnotatedField);
String str2;
do
{
do
return str1;
while (str1.length() != 0);
str2 = this._secondary.findSerializablePropertyName(paramAnnotatedField);
}
while (str2 == null);
return str2;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:17,代码来源:AnnotationIntrospector.java
示例5: addReferenceProperties
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
protected void addReferenceProperties(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanDeserializerBuilder paramBeanDeserializerBuilder)
{
Map localMap = paramBasicBeanDescription.findBackReferenceProperties();
if (localMap != null)
{
Iterator localIterator = localMap.entrySet().iterator();
while (localIterator.hasNext())
{
Map.Entry localEntry = (Map.Entry)localIterator.next();
String str = (String)localEntry.getKey();
AnnotatedMember localAnnotatedMember = (AnnotatedMember)localEntry.getValue();
if ((localAnnotatedMember instanceof AnnotatedMethod))
paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedMethod)localAnnotatedMember));
else
paramBeanDeserializerBuilder.addBackReferenceProperty(str, constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMember.getName(), (AnnotatedField)localAnnotatedMember));
}
}
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:19,代码来源:BeanDeserializerFactory.java
示例6: constructSettableProperty
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
protected SettableBeanProperty constructSettableProperty(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, String paramString, AnnotatedField paramAnnotatedField)
{
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.CAN_OVERRIDE_ACCESS_MODIFIERS))
paramAnnotatedField.fixAccess();
JavaType localJavaType1 = paramBasicBeanDescription.bindingsForBeanType().resolveType(paramAnnotatedField.getGenericType());
BeanProperty.Std localStd = new BeanProperty.Std(paramString, localJavaType1, paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
JavaType localJavaType2 = resolveType(paramDeserializationConfig, paramBasicBeanDescription, localJavaType1, paramAnnotatedField, localStd);
if (localJavaType2 != localJavaType1)
localStd = localStd.withType(localJavaType2);
JsonDeserializer localJsonDeserializer = findDeserializerFromAnnotation(paramDeserializationConfig, paramAnnotatedField, localStd);
JavaType localJavaType3 = modifyTypeByAnnotation(paramDeserializationConfig, paramAnnotatedField, localJavaType2, paramString);
Object localObject = new SettableBeanProperty.FieldProperty(paramString, localJavaType3, (TypeDeserializer)localJavaType3.getTypeHandler(), paramBasicBeanDescription.getClassAnnotations(), paramAnnotatedField);
if (localJsonDeserializer != null)
localObject = ((SettableBeanProperty)localObject).withValueDeserializer(localJsonDeserializer);
AnnotationIntrospector.ReferenceProperty localReferenceProperty = paramDeserializationConfig.getAnnotationIntrospector().findReferenceType(paramAnnotatedField);
if ((localReferenceProperty != null) && (localReferenceProperty.isManagedReference()))
((SettableBeanProperty)localObject).setManagedReferenceName(localReferenceProperty.getName());
return localObject;
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:BeanDeserializerFactory.java
示例7: findBeanProperties
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
protected List<BeanPropertyWriter> findBeanProperties(SerializationConfig paramSerializationConfig, BasicBeanDescription paramBasicBeanDescription)
{
List localList = paramBasicBeanDescription.findProperties();
AnnotationIntrospector localAnnotationIntrospector = paramSerializationConfig.getAnnotationIntrospector();
removeIgnorableTypes(paramSerializationConfig, paramBasicBeanDescription, localList);
if (paramSerializationConfig.isEnabled(SerializationConfig.Feature.REQUIRE_SETTERS_FOR_GETTERS))
removeSetterlessGetters(paramSerializationConfig, paramBasicBeanDescription, localList);
if (localList.isEmpty())
return null;
boolean bool = usesStaticTyping(paramSerializationConfig, paramBasicBeanDescription, null, null);
PropertyBuilder localPropertyBuilder = constructPropertyBuilder(paramSerializationConfig, paramBasicBeanDescription);
ArrayList localArrayList = new ArrayList(localList.size());
TypeBindings localTypeBindings = paramBasicBeanDescription.bindingsForBeanType();
Iterator localIterator = localList.iterator();
while (localIterator.hasNext())
{
BeanPropertyDefinition localBeanPropertyDefinition = (BeanPropertyDefinition)localIterator.next();
AnnotatedMember localAnnotatedMember = localBeanPropertyDefinition.getAccessor();
AnnotationIntrospector.ReferenceProperty localReferenceProperty = localAnnotationIntrospector.findReferenceType(localAnnotatedMember);
if ((localReferenceProperty == null) || (!localReferenceProperty.isBackReference()))
{
String str = localBeanPropertyDefinition.getName();
if ((localAnnotatedMember instanceof AnnotatedMethod))
localArrayList.add(_constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, str, (AnnotatedMethod)localAnnotatedMember));
else
localArrayList.add(_constructWriter(paramSerializationConfig, localTypeBindings, localPropertyBuilder, bool, str, (AnnotatedField)localAnnotatedMember));
}
}
return localArrayList;
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:31,代码来源:BeanSerializerFactory.java
示例8: hasIgnoreMarker
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public boolean hasIgnoreMarker(AnnotatedMember paramAnnotatedMember)
{
if ((paramAnnotatedMember instanceof AnnotatedMethod))
return isIgnorableMethod((AnnotatedMethod)paramAnnotatedMember);
if ((paramAnnotatedMember instanceof AnnotatedField))
return isIgnorableField((AnnotatedField)paramAnnotatedMember);
if ((paramAnnotatedMember instanceof AnnotatedConstructor))
return isIgnorableConstructor((AnnotatedConstructor)paramAnnotatedMember);
return false;
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:11,代码来源:AnnotationIntrospector.java
示例9: isFieldVisible
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
@Override
public boolean isFieldVisible(AnnotatedField f)
{
return false;
}
开发者ID:apache,项目名称:apex-core,代码行数:6,代码来源:ObjectMapperFactory.java
示例10: nameForField
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
@Override
public String nameForField(MapperConfig<?> config, AnnotatedField field, String defaultName) {
return convert(defaultName);
}
开发者ID:apache,项目名称:samza,代码行数:5,代码来源:SamzaObjectMapper.java
示例11: FieldProperty
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public FieldProperty(String paramString, JavaType paramJavaType, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, AnnotatedField paramAnnotatedField)
{
super(paramJavaType, paramTypeDeserializer, paramAnnotations);
this._annotated = paramAnnotatedField;
this._field = paramAnnotatedField.getAnnotated();
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:7,代码来源:SettableBeanProperty.java
示例12: isIgnorableField
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public boolean isIgnorableField(AnnotatedField paramAnnotatedField)
{
return (this._primary.isIgnorableField(paramAnnotatedField)) || (this._secondary.isIgnorableField(paramAnnotatedField));
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:5,代码来源:AnnotationIntrospector.java
示例13: nameForField
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public String nameForField(MapperConfig<?> paramMapperConfig, AnnotatedField paramAnnotatedField, String paramString)
{
return paramString;
}
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:5,代码来源:PropertyNamingStrategy.java
示例14: buildProperty
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
/**
* @param contentTypeSer Optional explicit type information serializer
* to use for contained values (only used for properties that are
* of container type)
*/
protected BeanPropertyWriter buildProperty(String name, JsonSerializer<Object> ser,
TypeSerializer typeSer, TypeSerializer contentTypeSer,
AnnotatedMember am, boolean defaultUseStaticTyping)
{
Field f;
Method m;
if (am instanceof AnnotatedField) {
m = null;
f = ((AnnotatedField) am).getAnnotated();
} else {
m = ((AnnotatedMethod) am).getAnnotated();
f = null;
}
// do we have annotation that forces type to use (to declared type or its super type)?
JavaType serializationType = findSerializationType(am, defaultUseStaticTyping);
// Container types can have separate type serializers for content (value / element) type
if (contentTypeSer != null) {
/* 04-Feb-2010, tatu: Let's force static typing for collection, if there is
* type information for contents. Should work well (for JAXB case); can be
* revisited if this causes problems.
*/
if (serializationType == null) {
serializationType = TypeFactory.type(am.getGenericType());
}
JavaType ct = serializationType.getContentType();
ct.setTypeHandler(contentTypeSer);
}
Object suppValue = null;
boolean suppressNulls = false;
JsonSerialize.Inclusion methodProps = _annotationIntrospector.findSerializationInclusion(am, _outputProps);
if (methodProps != null) {
switch (methodProps) {
case NON_DEFAULT:
suppValue = getDefaultValue(name, m, f);
if (suppValue == null) {
suppressNulls = true;
}
break;
case NON_NULL:
suppressNulls = true;
break;
}
}
return new BeanPropertyWriter(name, ser, typeSer, serializationType, m, f, suppressNulls, suppValue);
}
开发者ID:r00li,项目名称:RHome,代码行数:54,代码来源:PropertyBuilder.java
示例15: nameForField
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public String nameForField(MapperConfig<?> paramMapperConfig, AnnotatedField paramAnnotatedField, String paramString)
{
return translate(paramString);
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:5,代码来源:PropertyNamingStrategy$PropertyNamingStrategyBase.java
示例16: addBeanProps
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
protected void addBeanProps(DeserializationConfig paramDeserializationConfig, BasicBeanDescription paramBasicBeanDescription, BeanDeserializerBuilder paramBeanDeserializerBuilder)
{
List localList = paramBasicBeanDescription.findProperties();
AnnotationIntrospector localAnnotationIntrospector = paramDeserializationConfig.getAnnotationIntrospector();
Boolean localBoolean = localAnnotationIntrospector.findIgnoreUnknownProperties(paramBasicBeanDescription.getClassInfo());
if (localBoolean != null)
paramBeanDeserializerBuilder.setIgnoreUnknownProperties(localBoolean.booleanValue());
HashSet localHashSet = ArrayBuilders.arrayToSet(localAnnotationIntrospector.findPropertiesToIgnore(paramBasicBeanDescription.getClassInfo()));
Iterator localIterator1 = localHashSet.iterator();
while (localIterator1.hasNext())
paramBeanDeserializerBuilder.addIgnorable((String)localIterator1.next());
Set localSet = paramBasicBeanDescription.getIgnoredPropertyNames();
if (localSet != null)
{
Iterator localIterator4 = localSet.iterator();
while (localIterator4.hasNext())
paramBeanDeserializerBuilder.addIgnorable((String)localIterator4.next());
}
HashMap localHashMap = new HashMap();
Iterator localIterator2 = localList.iterator();
while (localIterator2.hasNext())
{
BeanPropertyDefinition localBeanPropertyDefinition2 = (BeanPropertyDefinition)localIterator2.next();
String str2 = localBeanPropertyDefinition2.getName();
if (!localHashSet.contains(str2))
if (localBeanPropertyDefinition2.hasConstructorParameter())
{
paramBeanDeserializerBuilder.addCreatorProperty(localBeanPropertyDefinition2);
}
else if (localBeanPropertyDefinition2.hasSetter())
{
AnnotatedMethod localAnnotatedMethod3 = localBeanPropertyDefinition2.getSetter();
if (isIgnorableType(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMethod3.getParameterClass(0), localHashMap))
{
paramBeanDeserializerBuilder.addIgnorable(str2);
}
else
{
SettableBeanProperty localSettableBeanProperty2 = constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, str2, localAnnotatedMethod3);
if (localSettableBeanProperty2 != null)
paramBeanDeserializerBuilder.addProperty(localSettableBeanProperty2);
}
}
else if (localBeanPropertyDefinition2.hasField())
{
AnnotatedField localAnnotatedField = localBeanPropertyDefinition2.getField();
if (isIgnorableType(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedField.getRawType(), localHashMap))
{
paramBeanDeserializerBuilder.addIgnorable(str2);
}
else
{
SettableBeanProperty localSettableBeanProperty1 = constructSettableProperty(paramDeserializationConfig, paramBasicBeanDescription, str2, localAnnotatedField);
if (localSettableBeanProperty1 != null)
paramBeanDeserializerBuilder.addProperty(localSettableBeanProperty1);
}
}
}
AnnotatedMethod localAnnotatedMethod1 = paramBasicBeanDescription.findAnySetter();
if (localAnnotatedMethod1 != null)
paramBeanDeserializerBuilder.setAnySetter(constructAnySetter(paramDeserializationConfig, paramBasicBeanDescription, localAnnotatedMethod1));
if (paramDeserializationConfig.isEnabled(DeserializationConfig.Feature.USE_GETTERS_AS_SETTERS))
{
Iterator localIterator3 = localList.iterator();
while (localIterator3.hasNext())
{
BeanPropertyDefinition localBeanPropertyDefinition1 = (BeanPropertyDefinition)localIterator3.next();
if (localBeanPropertyDefinition1.hasGetter())
{
String str1 = localBeanPropertyDefinition1.getName();
if ((!paramBeanDeserializerBuilder.hasProperty(str1)) && (!localHashSet.contains(str1)))
{
AnnotatedMethod localAnnotatedMethod2 = localBeanPropertyDefinition1.getGetter();
Class localClass = localAnnotatedMethod2.getRawType();
if (((Collection.class.isAssignableFrom(localClass)) || (Map.class.isAssignableFrom(localClass))) && (!localHashSet.contains(str1)) && (!paramBeanDeserializerBuilder.hasProperty(str1)))
paramBeanDeserializerBuilder.addProperty(constructSetterlessProperty(paramDeserializationConfig, paramBasicBeanDescription, str1, localAnnotatedMethod2));
}
}
}
}
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:82,代码来源:BeanDeserializerFactory.java
示例17: super
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public SettableBeanProperty$FieldProperty(String paramString, JavaType paramJavaType, TypeDeserializer paramTypeDeserializer, Annotations paramAnnotations, AnnotatedField paramAnnotatedField)
{
super(paramString, paramJavaType, paramTypeDeserializer, paramAnnotations);
this._annotated = paramAnnotatedField;
this._field = paramAnnotatedField.getAnnotated();
}
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:7,代码来源:SettableBeanProperty$FieldProperty.java
示例18: findDeserializablePropertyName
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public abstract String findDeserializablePropertyName(AnnotatedField paramAnnotatedField);
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:2,代码来源:AnnotationIntrospector.java
示例19: findSerializablePropertyName
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public abstract String findSerializablePropertyName(AnnotatedField paramAnnotatedField);
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:2,代码来源:AnnotationIntrospector.java
示例20: isIgnorableField
import org.codehaus.jackson.map.introspect.AnnotatedField; //导入依赖的package包/类
public abstract boolean isIgnorableField(AnnotatedField paramAnnotatedField);
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:2,代码来源:AnnotationIntrospector.java
注:本文中的org.codehaus.jackson.map.introspect.AnnotatedField类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论