@Test public void testEnumValue() throws CustomParseException { MEnum<Foo> enumVal = new MValue.MEnum<Foo>(null, Foo.class.getName(), "Bar"); Enum<Foo> obj = enumVal.asEhcacheObject(getClass().getClassLoader()); Assert.assertEquals(Foo.Bar, obj); try { MEnum<Foo> mEnum = new MValue.MEnum<Foo>(null, Foo.class.getName(), "Barr"); mEnum.asEhcacheObject(getClass().getClassLoader()); Assert.fail(); } catch (Exception e) { } }
public T asEhcacheObject(ClassLoader loader) { return javaObject; }
MValue implements ModelElement<T> { public T asEhcacheObject(ClassLoader loader) { return javaObject; } }
MValue implements ModelElement<T> { public T asEhcacheObject(ClassLoader loader) { return javaObject; } MValue(Token tok, String typeName, Message errMessage, String value); }
MValue implements ModelElement<T> { public T asEhcacheObject(ClassLoader loader) { return javaObject; } MValue(Token tok, String typeName, Message errMessage, String value); T asEhcacheObject(ClassLoader loader); @Override String toString(); String getTypeName(); String getValue(); @Override int hashCode(); @Override boolean equals(Object obj); }
MValue implements ModelElement<T> { public T asEhcacheObject(ClassLoader loader) { return javaObject; } MValue(Token tok, String typeName, Message errMessage, String value); T asEhcacheObject(ClassLoader loader); @Override String toString(); String getTypeName(); String getValue(); @Override int hashCode(); @Override boolean equals(Object obj);  }