JVar object = method.param( codeGenerator.ref( descriptor.getQualifiedName() ), OBJECT );
method.body()._return( JExpr._new( jaxbType ).arg( object.invoke( METHOD_NAME_GET_ID ) ) );
}
private void createCopyMethod( String methodName, JDefinedClass targetType, boolean stub ) {
JMethod method = mappingClass.method( JMod.PROTECTED, Void.TYPE, methodName );
method.annotate( Override.class );
JVar source = method.param( codeGenerator.ref( descriptor.getQualifiedName() ), "source" );
JVar target = method.param( targetType, "target" );
JVar context = method.param( codeGenerator.ref( UriContext.class ), CONTEXT );
addFieldCopyOperations( source, target, context, method.body(), stub );
}