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


Java Person类代码示例

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


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

示例1: test_PersonList

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PersonList() throws Exception {
    List<Person> args = new ArrayList<Person>();
    args.add(new Person());

    assertObject(args);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:8,代码来源:AbstractSerializationPersionOkTest.java

示例2: test_PersonSet

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PersonSet() throws Exception {
    Set<Person> args = new HashSet<Person>();
    args.add(new Person());

    assertObject(args);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:8,代码来源:AbstractSerializationPersionOkTest.java

示例3: test_IntPersonMap

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_IntPersonMap() throws Exception {
    Map<Integer, Person> args = new HashMap<Integer, Person>();
    args.put(1, new Person());

    assertObject(args);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:8,代码来源:AbstractSerializationPersionOkTest.java

示例4: test_StringPersonMap

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_StringPersonMap() throws Exception {
    Map<String, Person> args = new HashMap<String, Person>();
    args.put("1", new Person());

    assertObject(args);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:8,代码来源:AbstractSerializationPersionOkTest.java

示例5: test_StringPersonListMap

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_StringPersonListMap() throws Exception {
    Map<String, List<Person>> args = new HashMap<String, List<Person>>();

    List<Person> sublist = new ArrayList<Person>();
    sublist.add(new Person());
    args.put("1", sublist);

    assertObject(args);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:11,代码来源:AbstractSerializationPersionOkTest.java

示例6: test_PersonListList

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PersonListList() throws Exception {
    List<List<Person>> args = new ArrayList<List<Person>>();
    List<Person> sublist = new ArrayList<Person>();
    sublist.add(new Person());
    args.add(sublist);

    assertObject(args);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:10,代码来源:AbstractSerializationPersionOkTest.java

示例7: test_Map_List_pojo

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_Map_List_pojo() throws Exception {
    Map<String, List<Object>> map = new HashMap<String, List<Object>>();
    
    List<Object> list = new ArrayList<Object>();
    list.add(new Person());
    list.add(new SerializablePerson());
    
    map.put("k", list);
    
    Object generalize = PojoUtils.generalize(map);
    Object realize = PojoUtils.realize(generalize, Map.class);
    assertEquals(map, realize);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:15,代码来源:PojoUtilsTest.java

示例8: test_PojoArray

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_PojoArray() throws Exception {
    Person[] array = new Person[2];
    array[0] = new Person();
    {
        Person person = new Person();
        person.setName("xxxx");
        array[1] = person;
    }
    assertArrayObject(array);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:12,代码来源:PojoUtilsTest.java

示例9: test_simpleCollection

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void test_simpleCollection() throws Exception {
    Type gtype = getType("returnListPersonMethod");
    List<Person> list = new ArrayList<Person>();
    list.add(new Person());
    {
        Person person = new Person();
        person.setName("xxxx");
        list.add(person);
    }
    assertObject(list,gtype);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:13,代码来源:PojoUtilsTest.java

示例10: testRealizeLinkedList

import com.alibaba.dubbo.common.model.Person; //导入依赖的package包/类
@Test
public void testRealizeLinkedList() throws Exception {
    LinkedList<Person> input = new LinkedList<Person>();
    Person person = new Person();
    person.setAge(37);
    input.add(person);
    Object obj = PojoUtils.generalize(input);
    Assert.assertTrue(obj instanceof List);
    Assert.assertTrue(input.get(0) instanceof Person);
    Object output = PojoUtils.realize(obj, LinkedList.class);
    Assert.assertTrue(output instanceof LinkedList);
}
 
开发者ID:dachengxi,项目名称:EatDubbo,代码行数:13,代码来源:PojoUtilsTest.java


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