@Test public void testRender() { Object obj = new Object(); String repr = OID.render(obj); log(repr); assertThat(repr, is(equalTo(obj.toString()))); String prefix = Object.class.getName() + OID.SEPARATOR; assertThat(repr.startsWith(prefix), is(true)); assertThat(repr.length(), greaterThan(prefix.length())); }
public static String render(final Object obj) { assert obj != null; return get(obj).toString(); }
OID { public static String render(final Object obj) { assert obj != null; return get(obj).toString(); } }
OID { public static String render(final Object obj) { assert obj != null; return get(obj).toString(); } private  OID(final String type, final int hash); private  OID(); }
OID { public static String render(final Object obj) { assert obj != null; return get(obj).toString(); } private  OID(final String type, final int hash); private  OID(); String getType(); int getHash(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static OID get(final Object obj); static OID oid(final Object obj); static OID parse(final String spec); static String render(final Object obj); static T find(final Collection<T> items, final String id); static T find(final Collection<T> items, final OID id); }
OID { public static String render(final Object obj) { assert obj != null; return get(obj).toString(); } private  OID(final String type, final int hash); private  OID(); String getType(); int getHash(); @Override boolean equals(final Object obj); @Override int hashCode(); @Override String toString(); static OID get(final Object obj); static OID oid(final Object obj); static OID parse(final String spec); static String render(final Object obj); static T find(final Collection<T> items, final String id); static T find(final Collection<T> items, final OID id); static final OID NULL; static final String SEPARATOR; }