createDataPoint( STUB_DATA_POINT_NAME, jaxbStub );
createCollectionDataPoint( COLLECTION_DATA_POINT_NAME );
}
private void createCollectionDataPoint( String identifier ) {
JMethod method = createDataPointMethod( identifier, jaxbCollection );
JVar stub0 = method.body().decl( jaxbStub, "firstStub", JExpr._new( jaxbStub ).arg( "daId0" ) );
JBlock block0 = new JBlock( true, true );
method.body().add( block0 );
addFieldCopy( block0, jaxbStub, stub0 );
JVar stub1 = method.body().decl( jaxbStub, "secondStub", JExpr._new( jaxbStub ).arg( "daId1" ) );
JBlock block1 = new JBlock( true, true );
method.body().add( block1 );
addFieldCopy( block1, jaxbStub, stub1 );
JExpression stubsExpression = codeGenerator.getClassRefSupport().ref( Arrays.class ).staticInvoke( NewInstanceFactory.METHOD_NAME_AS_LIST )
.arg( stub0 )
.arg( stub1 );
JVar jaxbObjectInstance = method.body().decl( jaxbCollection, OBJECT, JExpr._new( jaxbCollection ).arg( stubsExpression ) );
//Sets the href
addHrefSet( method.body(), jaxbObjectInstance );
method.body()._return( JExpr.invoke( METHOD_NAME_CREATE ).arg( jaxbObjectInstance ).arg( createGetResourceStatement( jaxbTestClass, identifier ) ) );
createTestResource( jaxbTestClass, identifier );
}