superType,
intfaces );
{
if ( classDef.getDefinedClass() == null || classDef.getDefinedClass().getAnnotation( Trait.class ) == null ) {
AnnotationVisitor av0 = cw.visitAnnotation( Type.getDescriptor( Trait.class ), true);
List<AnnotationDefinition> annotations = classDef.getAnnotations();
if ( annotations != null && ! annotations.isEmpty() ) {
for ( Iterator<AnnotationDefinition> iter = annotations.iterator(); iter.hasNext(); ) {
AnnotationDefinition adef = iter.next();
if ( Trait.class.getName().equals( adef.getName() ) ) {
if ( adef.getPropertyValue( "logical" ) != null ) {
av0.visit( "logical", (Boolean) adef.getPropertyValue( "logical" ) );
}
if ( adef.getPropertyValue( "impl" ) != null ) {
av0.visit( "impl", Type.getType( (Class) adef.getPropertyValue( "impl" ) ) );
}
break;
}
}
}
av0.visitEnd();
}
}
for ( FieldDefinition field : classDef.getFieldsDefinitions() ) {
buildField( cw, field );