public void testCreateClassElementValue() throws Exception
{
final ClassGen cg = createClassGen("HelloWorld");
final ConstantPoolGen cp = cg.getConstantPool();
final ObjectType classType = new ObjectType("java.lang.Integer");
final ClassElementValueGen evg = new ClassElementValueGen(classType, cp);
assertTrue("Unexpected value for contained class: '"
+ evg.getClassString() + "'", evg.getClassString().contains("Integer"));
checkSerialize(evg, cp);
}
|