本文整理汇总了Java中org.codehaus.jackson.annotate.JsonManagedReference类的典型用法代码示例。如果您正苦于以下问题:Java JsonManagedReference类的具体用法?Java JsonManagedReference怎么用?Java JsonManagedReference使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JsonManagedReference类属于org.codehaus.jackson.annotate包,在下文中一共展示了JsonManagedReference类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChildren
import org.codehaus.jackson.annotate.JsonManagedReference; //导入依赖的package包/类
@SuppressWarnings("ReturnOfCollectionOrArrayField")
@JsonManagedReference("parent")
@Override
public LinkedList<TreeNode> getChildren() {
if (children instanceof LinkedList) {
return (LinkedList<TreeNode>) children;
} else {
return new LinkedList<>(children);
}
}
示例2: setChildren
import org.codehaus.jackson.annotate.JsonManagedReference; //导入依赖的package包/类
@JsonIgnore
@JsonManagedReference("parent")
public void setChildren(List<TreeNode> children) {
if (children instanceof LinkedList) {
this.children = children;
} else {
this.children = new LinkedList<>(children);
}
}
示例3: findReferenceType
import org.codehaus.jackson.annotate.JsonManagedReference; //导入依赖的package包/类
public AnnotationIntrospector.ReferenceProperty findReferenceType(AnnotatedMember paramAnnotatedMember)
{
JsonManagedReference localJsonManagedReference = (JsonManagedReference)paramAnnotatedMember.getAnnotation(JsonManagedReference.class);
if (localJsonManagedReference != null)
return AnnotationIntrospector.ReferenceProperty.managed(localJsonManagedReference.value());
JsonBackReference localJsonBackReference = (JsonBackReference)paramAnnotatedMember.getAnnotation(JsonBackReference.class);
if (localJsonBackReference != null)
return AnnotationIntrospector.ReferenceProperty.back(localJsonBackReference.value());
return null;
}
示例4: findDeserializablePropertyName
import org.codehaus.jackson.annotate.JsonManagedReference; //导入依赖的package包/类
public String findDeserializablePropertyName(AnnotatedField paramAnnotatedField)
{
JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedField.getAnnotation(JsonProperty.class);
if (localJsonProperty != null)
return localJsonProperty.value();
if ((paramAnnotatedField.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedField.hasAnnotation(JsonView.class)) || (paramAnnotatedField.hasAnnotation(JsonBackReference.class)) || (paramAnnotatedField.hasAnnotation(JsonManagedReference.class)))
return "";
return null;
}
示例5: findSettablePropertyName
import org.codehaus.jackson.annotate.JsonManagedReference; //导入依赖的package包/类
public String findSettablePropertyName(AnnotatedMethod paramAnnotatedMethod)
{
JsonProperty localJsonProperty = (JsonProperty)paramAnnotatedMethod.getAnnotation(JsonProperty.class);
if (localJsonProperty != null)
return localJsonProperty.value();
JsonSetter localJsonSetter = (JsonSetter)paramAnnotatedMethod.getAnnotation(JsonSetter.class);
if (localJsonSetter != null)
return localJsonSetter.value();
if ((paramAnnotatedMethod.hasAnnotation(JsonDeserialize.class)) || (paramAnnotatedMethod.hasAnnotation(JsonView.class)) || (paramAnnotatedMethod.hasAnnotation(JsonBackReference.class)) || (paramAnnotatedMethod.hasAnnotation(JsonManagedReference.class)))
return "";
return null;
}
示例6: getJobEvents
import org.codehaus.jackson.annotate.JsonManagedReference; //导入依赖的package包/类
/**
* @return the jobEvents
*/
@JsonManagedReference("job-event")
public List<JobEventEntity> getJobEvents() {
return new ArrayList<>(this.jobEvents);
}