Home
last modified time | relevance | path

Searched refs:Animal (Results 1 – 25 of 37) sorted by relevance

12

/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/jsontype/
DTestTypedDeserialization.java27 static abstract class Animal { class in TestTypedDeserialization
30 protected Animal(String n) { name = n; } in Animal() method in TestTypedDeserialization.Animal
34 static class Dog extends Animal
47 static class Cat extends Animal
62 static class Fish extends Animal
73 static class NullAnimal extends Animal
95 public Animal animal;
142 Animal a = m.readValue(asJSONObjectValueString("@classy", Cat.class.getName(), in testSimpleClassAsProperty()
143 "furColor", "tabby", "name", "Garfield"), Animal.class); in testSimpleClassAsProperty()
155 m.addMixIn(Animal.class, TypeWithWrapper.class); in testTypeAsWrapper()
[all …]
DTestTypedContainerSerialization.java26 static abstract class Animal { class in TestTypedContainerSerialization
29 protected Animal(String n) { in Animal() method in TestTypedContainerSerialization.Animal
35 static class Dog extends Animal {
53 static class Cat extends Animal {
72 Animal animal;
74 public Animal getAnimal() { in getAnimal()
78 public void setAnimal(Animal animal) { in setAnimal()
83 static class Container2<T extends Animal> {
118 Container2<Animal> c2 = new Container2<Animal>(); in testPolymorphicWithContainer()
127 ArrayList<Animal> animals = new ArrayList<Animal>(); in testIssue329()
[all …]
DTestTypeNames.java22 static class AnimalMap extends LinkedHashMap<String,Animal> { }
69 MAPPER.writeValueAsString(new Animal[] { new Dog("Spot", 3) })); in testSerialization()
71 MAPPER.writeValueAsString(new Animal[] { new MaineCoon("Belzebub", true)})); in testSerialization()
76 Animal[] input = new Animal[] { in testRoundTrip()
83 List<Animal> output = MAPPER.readValue(json, in testRoundTrip()
84 … TypeFactory.defaultInstance().constructCollectionType(ArrayList.class, Animal.class)); in testRoundTrip()
105 Animal in = input.get(name); in testRoundTripMap()
106 Animal out = output.get(name); in testRoundTripMap()
125 class Animal class
135 return name.equals(((Animal) o).name); in equals()
[all …]
DTestTypedSerialization.java25 static abstract class Animal { class in TestTypedSerialization
28 protected Animal(String n) { name = n; } in Animal() method in TestTypedSerialization.Animal
32 static class Dog extends Animal
44 static class Cat extends Animal
56 public Animal animal;
58 public AnimalWrapper(Animal a) { animal = a; } in AnimalWrapper()
105 m.addMixIn(Animal.class, TypeWithWrapper.class); in testTypeAsWrapper()
123 m.addMixIn(Animal.class, TypeWithArray.class); in testTypeAsArray()
156 Animal[] animals = new Animal[] { new Cat("Miuku", "white"), new Dog("Murre", 9) }; in testInArray()
DTestWithGenerics.java20 static abstract class Animal { class in TestWithGenerics
24 static class Dog extends Animal {
34 static class ContainerWithGetter<T extends Animal> {
42 static class ContainerWithField<T extends Animal> {
121 …static class ContainerWithTwoAnimals<U extends Animal,V extends Animal> extends ContainerWithField…
141 String json = MAPPER.writeValueAsString(new ContainerWithGetter<Animal>(dog)); in testWrapperWithGetter()
150 String json = MAPPER.writeValueAsString(new ContainerWithField<Animal>(dog)); in testWrapperWithField()
159 ContainerWithGetter<Animal> c2 = new ContainerWithGetter<Animal>(dog); in testWrapperWithExplicitType()
161 Animal.class)).writeValueAsString(c2); in testWrapperWithExplicitType()
DExistingPropertyTest.java73 static abstract class Animal { class in ExistingPropertyTest
76 protected Animal(String n) { name = n; } in Animal() method in ExistingPropertyTest.Animal
82 static class Dog extends Animal
99 static class Cat extends Animal
116 public Animal animal;
118 public AnimalWrapper(Animal a) { animal = a; } in AnimalWrapper()
213 private static final List<Animal> animalList = Arrays.asList(beelzebub, rover);
333 Animal beelzebubDeserialized = MAPPER.readValue(beelzebubJson, Animal.class); in testSimpleClassAsExistingPropertyDeserializationAnimals()
341 Animal beelzebubExtracted = beelzebubWrapperDeserialized.animal; in testSimpleClassAsExistingPropertyDeserializationAnimals()
349 List<Animal> animalListDeserialized = MAPPER.readValue(animalListJson, List.class); in testSimpleClassAsExistingPropertyDeserializationAnimals()
[all …]
/external/python/pybind11/tests/
Dtest_tagbased_polymorphic.cpp13 struct Animal struct
18 virtual ~Animal() = default;
33 Animal(const std::string& _name, Kind _kind) in Animal() argument
38 struct Dog : Animal
40 Dog(const std::string& _name, Kind _kind = Kind::Dog) : Animal(_name, _kind) {} in Dog()
58 struct Cat : Animal
60 Cat(const std::string& _name, Kind _kind = Kind::Cat) : Animal(_name, _kind) {} in Cat()
70 std::vector<std::unique_ptr<Animal>> create_zoo() in create_zoo()
72 std::vector<std::unique_ptr<Animal>> ret; in create_zoo()
86 const std::type_info* Animal::type_of_kind(Kind kind) in type_of_kind()
[all …]
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/creators/
DTestPolymorphicCreators.java14 static class Animal class in TestPolymorphicCreators
19 protected Animal() { } in Animal() method in TestPolymorphicCreators.Animal
26 public static Animal create(@JsonProperty("type") String type) in create()
38 static class Dog extends Animal
45 static class Cat extends Animal
102Animal animal = MAPPER.readValue("{ \"type\":\"dog\", \"name\":\"Fido\", \"barkVolume\" : 95.0 }",… in testManualPolymorphicDog()
111Animal animal = MAPPER.readValue("{ \"name\" : \"Macavity\", \"type\":\"cat\", \"lives\":18, \"lik… in testManualPolymorphicCatBasic()
123Animal animal = MAPPER.readValue("{ \"likesCream\":true, \"name\" : \"Venla\", \"type\":\"cat\" }"… in testManualPolymorphicCatWithReorder()
DTestCreatorWithPolymorphic113.java15 public static abstract class Animal { class in TestCreatorWithPolymorphic113
21 public Animal(@JsonProperty(ID) String id) { in Animal() method in TestCreatorWithPolymorphic113.Animal
32 public static class Dog extends Animal {
41 private Animal animal;
44 public AnimalWrapper(@JsonProperty("animal") Animal animal) { in AnimalWrapper()
48 public Animal getAnimal() { in getAnimal()
/external/auto/value/userguide/
Dgenerated-builder-example.md11 final class AutoValue_Animal extends Animal {
34 return "Animal{"
45 if (o instanceof Animal) {
46 Animal that = (Animal) o;
63 static final class Builder extends Animal.Builder {
71 Animal.Builder setName(String name) {
80 Animal.Builder setNumberOfLegs(int numberOfLegs) {
86 Animal build() {
Dbuilders.md21 ### In `Animal.java`<a name="example_java"></a>
27 abstract class Animal {
39 abstract Animal build();
52 Animal dog = Animal.builder().setName("dog").setNumberOfLegs(4).build();
58 Animal.builder().setName("dog").setNumberOfLegs(4).build().equals(dog));
60 Animal.builder().setName("cat").setNumberOfLegs(4).build().equals(dog));
62 Animal.builder().setName("dog").setNumberOfLegs(2).build().equals(dog));
64 assertEquals("Animal{name=dog, numberOfLegs=4}", dog.toString());
70 For the `Animal` example shown above, here is [typical code AutoValue might
76 `Animal`) and not the nested abstract `Builder` class. That ensures that the
[all …]
Dbuilders-howto.md47 Here is the `Animal` example using `get` prefixes but not `set` prefixes:
51 abstract class Animal {
63 abstract Animal build();
91 Here is the `Animal` example with the default number of legs being 4:
95 abstract class Animal {
108 abstract Animal build();
142 public abstract class Animal {
152 public Animal withName(String name) {
160 public abstract Animal build();
184 public abstract class Animal {
[all …]
Dgenerated-example.md11 final class AutoValue_Animal extends Animal {
35 return "Animal{"
45 if (o instanceof Animal) {
46 Animal that = (Animal) o;
Dindex.md57 abstract class Animal {
58 static Animal create(String name, int numberOfLegs) {
175 Animal dog = Animal.create("dog", 4);
180 assertTrue(Animal.create("dog", 4).equals(dog));
181 assertFalse(Animal.create("cat", 4).equals(dog));
182 assertFalse(Animal.create("dog", 2).equals(dog));
184 assertEquals("Animal{name=dog, numberOfLegs=4}", dog.toString());
208 For the `Animal` example shown above, here is [typical code AutoValue might
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/deser/builder/
DBuilderWithUnwrappedTest.java97 @JsonDeserialize(builder = Animal.Builder.class)
98 final static class Animal { class in BuilderWithUnwrappedTest
104 private Animal(Builder builder) { in Animal() method in BuilderWithUnwrappedTest.Animal
152 Animal build() { in build()
153 return new Animal(this); in build()
260 Animal animal = mapper.readValue(json, Animal.class); in testWithUnwrappedAndCreatorMultipleParametersAtBeginning()
273 Animal animal = mapper.readValue(json, Animal.class); in testWithUnwrappedAndCreatorMultipleParametersInMiddle()
286 Animal animal = mapper.readValue(json, Animal.class); in testWithUnwrappedAndCreatorMultipleParametersAtEnd()
/external/jackson-databind/src/test/java/com/fasterxml/jackson/databind/jsontype/ext/
DExternalTypeId2588Test.java13 interface Animal { } interface in ExternalTypeId2588Test
15 static class Cat implements Animal { }
17 public static class Dog implements Animal { }
27 private final Animal animal;
31 @JsonProperty("animal") Animal animal) { in Pet()
DExternalTypeIdWithEnum1328Test.java15 public interface Animal { } interface in ExternalTypeIdWithEnum1328Test
17 public static class Dog implements Animal {
32 private Animal animal;
38 public AnimalAndType(final AnimalType type, final Animal animal) { in AnimalAndType()
/external/guice/extensions/assistedinject/test/com/google/inject/assistedinject/
DExtensionSpiTest.java146 Animal createASimpleCatAsAnimal(String owner); in createASimpleCatAsAnimal()
148 Animal createAStrangeCatAsAnimal(String owner); in createAStrangeCatAsAnimal()
157 interface Animal {} interface in ExtensionSpiTest
159 private static class Cat implements Animal {
164 private static class SimpleCat implements Animal {
169 private static class StrangeCat implements Animal {
177 private static class ExplodingCat implements Animal {
202 .implement(Animal.class, StrangeCat.class) in configure()
203 .implement(Animal.class, named("SimpleCat"), SimpleCat.class) in configure()
/external/snakeyaml/src/test/java/org/yaml/snakeyaml/immutable/
DHouseBean.java20 private Animal animal;
30 public Animal getAnimal() { in getAnimal()
34 public void setAnimal(Animal animal) { in setAnimal()
/external/llvm-project/clang/test/CodeGenCXX/
Dubsan-type-checks.cpp33 struct Animal { struct
37 struct Cat : Animal {
41 struct Dog : Animal {
Ddevirtualize-virtual-function-calls.cpp149 struct Animal { struct
152 struct Fish : Animal {
/external/clang/test/CodeGenCXX/
Ddevirtualize-virtual-function-calls.cpp88 struct Animal { struct
91 struct Fish : Animal {
/external/python/pybind11/docs/advanced/
Dclasses.rst13 to override from within Python (we'll focus on the class ``Animal``; ``Dog`` is
19 class Animal {
21 virtual ~Animal() { }
25 class Dog : public Animal {
36 function ``go()`` on an arbitrary ``Animal`` instance.
40 std::string call_go(Animal *animal) {
49 py::class_<Animal>(m, "Animal")
50 .def("go", &Animal::go);
52 py::class_<Dog, Animal>(m, "Dog")
58 However, these bindings are impossible to extend: ``Animal`` is not
[all …]
Dmisc.rst52 class PyAnimal : public Animal {
55 using Animal::Animal;
64 Animal, /* Parent class */
72 py::class_<Animal, PyAnimal> animal(m, "Animal");
75 .def("go", &Animal::go);
80 m.def("call_go", [](Animal *animal) -> std::string {
166 class PYBIND11_EXPORT Dog : public Animal {
/external/flatbuffers/samples/android/jni/schemas/
Danimal.fbs17 table Animal {
22 root_type Animal;

12