• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Path类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: ComplicatedExample

import org.simpleframework.xml.Path; //导入依赖的package包/类
public ComplicatedExample(
      @Path("x:path[1]") @ElementMap(name="a") Map<Key, Entry> map,
      @Path("x:path[2]") @ElementList(name="a") List<Entry> list,
      @Element(name="elementOne") String elementOne,
      @Element(name="elementTwo") String elementTwo,
      @Element(name="elementThree") String elementThree,
      @Text String text,
      @Path("x:path[2]/x:someOtherPath") @Attribute(name="attribute_one") String attribute_one,
      @Path("x:path[2]/x:someOtherPath") @Attribute(name="attribute_two") String attribute_two) 
{
   this.map = map;
   this.list = list;
   this.elementOne = elementOne;
   this.elementTwo = elementTwo;
   this.elementThree = elementThree;
   this.text = text;
   this.attribute_one = attribute_one;
   this.attribute_two = attribute_two;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:20,代码来源:UnionComplicatedPathMixTest.java


示例2: Channel

import org.simpleframework.xml.Path; //导入依赖的package包/类
public Channel(@Element(name = "title")String title, @Path("link") @Text(required=false)String link, @Element(name = "description")String description, @Element(name = "copyright")String copyright, @ElementList(name = "episode", inline = true)List<Episode> episode) {
    this.title = title;
    this.link = link;
    this.description = description;
    this.copyright = copyright;
    this.episode = episode;
}
 
开发者ID:wax911,项目名称:anitrend-app,代码行数:8,代码来源:Channel.java


示例3: getPath

import org.simpleframework.xml.Path; //导入依赖的package包/类
/**
 * This is used to acquire the path of the element or attribute
 * that is used by the class schema. The path is determined by
 * acquiring the XPath expression and appending the name of the
 * label to form a fully qualified path.
 * 
 * @return returns the path that is used for the XML property
 */
public String getPath() throws Exception {
   Path path = contact.getAnnotation(Path.class);
   
   if(path == null) {
      return null;
   }
   return path.value();
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:17,代码来源:Introspector.java


示例4: Test1

import org.simpleframework.xml.Path; //导入依赖的package包/类
public Test1(
      @Attribute(name="iri") final String identifier,
      @Path(value="resource")@Attribute(name="iri") final String identifier1)
{
   super();
   this.identifier = identifier;
   this.identifier1 = identifier1;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:9,代码来源:Test1Test.java


示例5: InlineListUnion

import org.simpleframework.xml.Path; //导入依赖的package包/类
public InlineListUnion(
      @Path("x:path[1]") @ElementList(name="a") List<Entry> one,
      @Path("y:path[2]") @ElementList(name="a") List<Entry> two)
{
   this.one = one;
   this.two = two;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:8,代码来源:UnionElementListInConstructorTest.java


示例6: Test3

import org.simpleframework.xml.Path; //导入依赖的package包/类
public Test3(  @Path(value="elements")
            @ElementListUnion({
               @ElementList(entry="element-a", type=MyElementA.class, inline=true),
               @ElementList(entry="element-b", type=MyElementB.class, inline=true)
            })
            final java.util.ArrayList<MyElement> elements
      ) {
   super();
   this.elements = elements;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:11,代码来源:Test3Test.java


示例7: getElements

import org.simpleframework.xml.Path; //导入依赖的package包/类
@Path(value="elements")
@ElementListUnion({
   @ElementList(entry="elementA", type=MyElementA.class, inline=true),
   @ElementList(entry="elementB", type=MyElementB.class, inline=true),
   @ElementList(entry="element", type=MyElement.class, inline=true)
})
java.util.ArrayList<MyElement> getElements(){
   return this.elements;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:10,代码来源:Test4Test.java


示例8: setElements

import org.simpleframework.xml.Path; //导入依赖的package包/类
@Path(value="elements")
@ElementListUnion({
   @ElementList(entry="elementA", type=MyElementA.class, inline=true),
   @ElementList(entry="elementB", type=MyElementB.class, inline=true),
   @ElementList(entry="element", type=MyElement.class, inline=true)
})
void setElements(final java.util.ArrayList<MyElement> elements){
   this.elements = elements;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:10,代码来源:Test4Test.java


示例9: PathWithTextAndElementExample

import org.simpleframework.xml.Path; //导入依赖的package包/类
private PathWithTextAndElementExample(
      @Text String text,
      @Path("some/path") @Attribute(name="name") String value,
      @Path("some") @Element(name="name") String item) 
{
   this.item = item;
   this.value = value;
   this.text = text;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:10,代码来源:PathWithTextAndElementTest.java


示例10: OtherPathWithTextAndElementExample

import org.simpleframework.xml.Path; //导入依赖的package包/类
private OtherPathWithTextAndElementExample(
      @Path("valuePath/path") @Attribute(name="name") String a,
      @Path("someOtherPath/path") @Element(name="name") String b,
      @Text String c) 
{
   this.a = a;
   this.b = b;
   this.c = c;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:10,代码来源:PathWithTextAndElementTest.java


示例11: PathWithMultipleTextExample

import org.simpleframework.xml.Path; //导入依赖的package包/类
private PathWithMultipleTextExample(
      @Attribute(name="a") String a,
      @Path("valuePath[1]") @Text String b,
      @Attribute(name="c") String c,
      @Path("valuePath[2]") @Text String d)
{
   this.a = a;
   this.b = b;
   this.c = c;
   this.d = d;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:12,代码来源:PathWithTextAndElementTest.java


示例12: Example

import org.simpleframework.xml.Path; //导入依赖的package包/类
public Example(
      @Path("path[1]") @Element(name="b") String x, 
      @Path("path[2]") @Element(name="b") String y)
{
   this.y = y;
   this.x = x;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:8,代码来源:UnionWithSameNamesAndDifferentPathsTest.java


示例13: AmbiguousConstructorParameterExample

import org.simpleframework.xml.Path; //导入依赖的package包/类
public AmbiguousConstructorParameterExample(
      @Element(name="b") String ambiguous, 
      @Path("path[2]") @Element(name="b") String y)
{
   this.y = y;
   this.x = ambiguous;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:8,代码来源:UnionWithSameNamesAndDifferentPathsTest.java


示例14: getGroup

import org.simpleframework.xml.Path; //导入依赖的package包/类
private static Group getGroup() throws Exception {
   Field field = CompositeListUnionTest.class.getDeclaredField("EXAMPLE");
   Annotation annotation = field.getAnnotation(ElementListUnion.class);
   Annotation path = field.getAnnotation(Path.class);
   return new GroupExtractor(
         new FieldContact(field, annotation, new Annotation[]{annotation, path}),
         annotation,
         new Format());
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:10,代码来源:CompositeListUnionTest.java


示例15: Test1

import org.simpleframework.xml.Path; //导入依赖的package包/类
public Test1(
      @Attribute(name="iri")  String identifier,
      @Path(value="resource") @Attribute(name="iri") String identifier1)
{
   this.identifier = identifier;
   this.identifier1 = identifier1;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:8,代码来源:PathConstructorAmbiguityTest.java


示例16: getElements

import org.simpleframework.xml.Path; //导入依赖的package包/类
@Path(value="elements")
@ElementListUnion({
   @ElementList(entry="element-a", type=MyElementA.class, inline=true),
   @ElementList(entry="element-b", type=MyElementB.class, inline=true)
})
public java.util.ArrayList<MyElement> getElements(){
   return new java.util.ArrayList<MyElement>(this.elements);
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:9,代码来源:Test3_2Test.java


示例17: Test3_2

import org.simpleframework.xml.Path; //导入依赖的package包/类
public Test3_2(   @Path(value="elements")
            @ElementListUnion({
               @ElementList(entry="element-a", type=MyElementA.class, inline=true),
               @ElementList(entry="element-b", type=MyElementB.class, inline=true)
            })
            final java.util.ArrayList<MyElement> elements
      ) {
   super();
   this.elements = elements;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:11,代码来源:Test3_2Test.java


示例18: Test3_3

import org.simpleframework.xml.Path; //导入依赖的package包/类
public Test3_3(   @Path(value="elements")
            @ElementListUnion({
               @ElementList(entry="element-a", type=MyElementA.class, inline=true),
               @ElementList(entry="element-b", type=MyElementB.class, inline=true)
            })
            final java.util.Collection<MyElement> elements
      ) {
   super();
   this.elements = elements;
}
 
开发者ID:ngallagher,项目名称:simplexml,代码行数:11,代码来源:Test3_2Test.java


示例19: getNewssource

import org.simpleframework.xml.Path; //导入依赖的package包/类
@Path("channel/item")

    public String getNewssource() {
        return newssource;
    }
 
开发者ID:YiuChoi,项目名称:MicroReader,代码行数:6,代码来源:ItHomeArticle.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DataStore类代码示例发布时间:2022-05-21
下一篇:
Java IMetric类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap