当前位置: 首页>>代码示例>>Java>>正文


Java JsonSubTypes类代码示例

本文整理汇总了Java中org.codehaus.jackson.annotate.JsonSubTypes的典型用法代码示例。如果您正苦于以下问题:Java JsonSubTypes类的具体用法?Java JsonSubTypes怎么用?Java JsonSubTypes使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


JsonSubTypes类属于org.codehaus.jackson.annotate包,在下文中一共展示了JsonSubTypes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findSubtypes

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
public List<NamedType> findSubtypes(Annotated paramAnnotated)
{
  JsonSubTypes localJsonSubTypes = (JsonSubTypes)paramAnnotated.getAnnotation(JsonSubTypes.class);
  ArrayList localArrayList;
  if (localJsonSubTypes == null)
    localArrayList = null;
  while (true)
  {
    return localArrayList;
    JsonSubTypes.Type[] arrayOfType = localJsonSubTypes.value();
    localArrayList = new ArrayList(arrayOfType.length);
    int i = arrayOfType.length;
    for (int j = 0; j < i; j++)
    {
      JsonSubTypes.Type localType = arrayOfType[j];
      localArrayList.add(new NamedType(localType.value(), localType.name()));
    }
  }
}
 
开发者ID:zhangjianying,项目名称:12306-android-Decompile,代码行数:20,代码来源:JacksonAnnotationIntrospector.java

示例2: findSubtypes

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
public List<NamedType> findSubtypes(Annotated paramAnnotated)
{
  JsonSubTypes localJsonSubTypes = (JsonSubTypes)paramAnnotated.getAnnotation(JsonSubTypes.class);
  Object localObject;
  if (localJsonSubTypes == null)
    localObject = null;
  while (true)
  {
    return localObject;
    JsonSubTypes.Type[] arrayOfType = localJsonSubTypes.value();
    localObject = new ArrayList(arrayOfType.length);
    int i = arrayOfType.length;
    for (int j = 0; j < i; j++)
    {
      JsonSubTypes.Type localType = arrayOfType[j];
      ((ArrayList)localObject).add(new NamedType(localType.value(), localType.name()));
    }
  }
}
 
开发者ID:isnuryusuf,项目名称:ingress-indonesia-dev,代码行数:20,代码来源:JacksonAnnotationIntrospector.java

示例3: isAppEvent

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
private boolean isAppEvent(JsonNode parsed) {
    if (parsed != null && parsed.has("responseType")) {
        String type = parsed.get("responseType").asText();
        for (JsonSubTypes.Type t : STANDARD_RESPONSE_TYPES) {
            if (t.name().equals(type)) {
                return false;
            }
        }
    }
    return parsed == null || !parsed.has("requestId");
}
 
开发者ID:vitalidze,项目名称:chromecast-java-api-v2,代码行数:12,代码来源:Channel.java

示例4: getProcessResultList

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementWrapper
@XmlElementRefs({
    @XmlElementRef(type = org.tanaguru.entity.audit.IndefiniteResultImpl.class),
    @XmlElementRef(type = org.tanaguru.entity.audit.DefiniteResultImpl.class)})
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.audit.IndefiniteResultImpl.class, name="Indefinite"),
    @JsonSubTypes.Type(value=org.tanaguru.entity.audit.DefiniteResultImpl.class, name="Definite")})
public Collection<ProcessResult> getProcessResultList() {
    return (Collection)processResultSet;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:13,代码来源:WebResourceImpl.java

示例5: getSubject

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementRefs({
    @XmlElementRef(type = org.tanaguru.entity.subject.PageImpl.class),
    @XmlElementRef(type = org.tanaguru.entity.subject.SiteImpl.class)})
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.subject.PageImpl.class, name="Page"),
    @JsonSubTypes.Type(value=org.tanaguru.entity.subject.SiteImpl.class, name="Site")})
public WebResourceImpl getSubject() {
    return subject;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:12,代码来源:AuditImpl.java

示例6: getParameterSet

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.parameterization.ParameterImpl.class, name="Parameter")})
public Collection<Parameter> getParameterSet() {
    if (this.parameterSet == null) {
        this.parameterSet = new HashSet<>();
    }
    return (Collection)parameterSet;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:11,代码来源:AuditImpl.java

示例7: getElementList

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementWrapper
@XmlElementRefs({
    @XmlElementRef(type = org.tanaguru.entity.audit.EvidenceElementImpl.class)})
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.audit.EvidenceElementImpl.class, name="EvidenceElement")})
public Collection<EvidenceElement> getElementList() {
    return (Collection)elementSet;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:11,代码来源:ProcessRemarkImpl.java

示例8: getRemarkSet

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
    @XmlElementWrapper
    @XmlElementRefs({
        @XmlElementRef(type = org.tanaguru.entity.audit.ProcessRemarkImpl.class),
        @XmlElementRef(type = org.tanaguru.entity.audit.SourceCodeRemarkImpl.class)})
    @JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
    @JsonSubTypes({
        @JsonSubTypes.Type(value=org.tanaguru.entity.audit.ProcessRemarkImpl.class, name="ProcessRemark"), 
        @JsonSubTypes.Type(value=org.tanaguru.entity.audit.SourceCodeRemarkImpl.class, name="SourceCodeRemark")})
//    @Audited(targetAuditMode = RelationTargetAuditMode.NOT_AUDITED)
    public Collection<ProcessRemark> getRemarkSet() {
        return (Collection)remarkSet;
    }
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:14,代码来源:ProcessResultImpl.java

示例9: getTest

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementRef(type = org.tanaguru.entity.reference.TestImpl.class)
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.reference.TestImpl.class, name="Test")})
public Test getTest() {
    return test;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:9,代码来源:ProcessResultImpl.java

示例10: getEvidence

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@XmlTransient
@Override
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.audit.EvidenceImpl.class, name="Evidence")})
public Evidence getEvidence() {
    return (Evidence) evidence;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:9,代码来源:EvidenceElementImpl.java

示例11: getValue

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.audit.TestSolution.class, name="TestSolution")})
public Object getValue() {
    return getDefiniteValue();
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:8,代码来源:DefiniteResultImpl.java

示例12: setParameterElement

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementWrapper
@XmlElementRef(type = org.tanaguru.entity.parameterization.ParameterElementImpl.class)
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.parameterization.ParameterElementImpl.class, name="ParameterElement")})
public void setParameterElement(ParameterElement parameterElement) {
    this.parameterElement = (ParameterElementImpl)parameterElement;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:10,代码来源:ParameterImpl.java

示例13: setParameterFamily

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementWrapper
@XmlElementRef(type = org.tanaguru.entity.parameterization.ParameterFamilyImpl.class)
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value=org.tanaguru.entity.parameterization.ParameterFamilyImpl.class, name="ParameterFamily")})
public void setParameterFamily(ParameterFamily parameterFamily) {
    this.parameterFamily = (ParameterFamilyImpl)parameterFamily;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:10,代码来源:ParameterElementImpl.java

示例14: getCriterion

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementRef(type = org.tanaguru.entity.reference.CriterionImpl.class)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value = org.tanaguru.entity.reference.CriterionImpl.class, name = "Criterion")})
public Criterion getCriterion() {
    return this.criterion;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:9,代码来源:TestImpl.java

示例15: getLevel

import org.codehaus.jackson.annotate.JsonSubTypes; //导入依赖的package包/类
@Override
@XmlElementRef(type = org.tanaguru.entity.reference.LevelImpl.class)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.WRAPPER_OBJECT)
@JsonSubTypes({
    @JsonSubTypes.Type(value = org.tanaguru.entity.reference.LevelImpl.class, name = "Level")})
public Level getLevel() {
    return this.level;
}
 
开发者ID:Tanaguru,项目名称:Tanaguru,代码行数:9,代码来源:TestImpl.java


注:本文中的org.codehaus.jackson.annotate.JsonSubTypes类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。