public ObjectTypeNode buildObjectTypeNode( int id, EntryPointNode objectSource, ObjectType objectType, BuildContext context ) {
if ( objectType.getValueType().equals( ValueType.TRAIT_TYPE ) ) {
if ( TraitProxy.class.isAssignableFrom( ( (ClassObjectType) objectType ).getClassType() ) ) {
return new TraitProxyObjectTypeNode( id, objectSource, objectType, context );
} else {
return new TraitObjectTypeNode( id, objectSource, objectType, context );
}
} else {
return new ObjectTypeNode( id, objectSource, objectType, context );
}
}