InstantiationException,
NoSuchFieldException {
ClassWriter cw = new ClassWriter( ClassWriter.COMPUTE_MAXS );
FieldVisitor fv;
MethodVisitor mv;
// get the method bitmask
BitSet mask = traitRegistry.getFieldMask(trait.getName(), core.getDefinedClass().getName());
String name = TraitFactory.getPropertyWrapperName( trait, core );
String masterName = TraitFactory.getProxyName(trait, core);
String internalWrapper = BuildUtils.getInternalType( name );
String descrCore = Type.getDescriptor( core.getDefinedClass() );
String internalCore = Type.getInternalName( core.getDefinedClass() );
cw.visit( ClassGenerator.JAVA_VERSION, ACC_PUBLIC + ACC_SUPER,
internalWrapper,
null,
Type.getInternalName( TripleBasedStruct.class ),
new String[] { Type.getInternalName( Serializable.class ) } );
cw.visitInnerClass( Type.getInternalName( Map.Entry.class ),
Type.getInternalName( Map.class ),
"Entry",
ACC_PUBLIC + ACC_STATIC + ACC_ABSTRACT + ACC_INTERFACE );
{
fv = cw.visitField(0, "object", descrCore, null, null);
fv.visitEnd();
}
{
mv = cw.visitMethod(ACC_PUBLIC,