@Test public void testLenientGetValue() { Parent parent = new Parent(); assertNull(lenientFacet.getValue(parent)); parent.child = new Child(); assertNull(lenientFacet.getValue(parent)); parent.child.property = "test_value"; assertEquals("test_value", lenientFacet.getValue(parent)); }
@Override public Object getValue(Object pojo) { Object parentValue = parentValue(pojo); return parentValue == null ? null : child.getValue(parentValue); }
SubFacet implements Facet { @Override public Object getValue(Object pojo) { Object parentValue = parentValue(pojo); return parentValue == null ? null : child.getValue(parentValue); } }
SubFacet implements Facet { @Override public Object getValue(Object pojo) { Object parentValue = parentValue(pojo); return parentValue == null ? null : child.getValue(parentValue); } SubFacet(Facet parent, Facet child, boolean autoCreateParent); }
SubFacet implements Facet { @Override public Object getValue(Object pojo) { Object parentValue = parentValue(pojo); return parentValue == null ? null : child.getValue(parentValue); } SubFacet(Facet parent, Facet child, boolean autoCreateParent); @Override Facet flatten(); @Override A getAnnotation(Class<A> annotationType); @Override String getName(); @Override GenericType getType(); @Override Object getValue(Object pojo); @Override boolean hasAnnotation(Class<A> annotationType); @Override void setValue(Object pojo, Object value); @Override List<Facet> subFacets(boolean autoCreateParent); }
SubFacet implements Facet { @Override public Object getValue(Object pojo) { Object parentValue = parentValue(pojo); return parentValue == null ? null : child.getValue(parentValue); } SubFacet(Facet parent, Facet child, boolean autoCreateParent); @Override Facet flatten(); @Override A getAnnotation(Class<A> annotationType); @Override String getName(); @Override GenericType getType(); @Override Object getValue(Object pojo); @Override boolean hasAnnotation(Class<A> annotationType); @Override void setValue(Object pojo, Object value); @Override List<Facet> subFacets(boolean autoCreateParent); static final String SEPARATOR; }