com.force.sdk.codegen.writer
Class BasicWriterProvider

java.lang.Object
  extended by com.force.sdk.codegen.writer.BasicWriterProvider
All Implemented Interfaces:
WriterProvider

public class BasicWriterProvider
extends Object
implements WriterProvider

A pass-through code generation WriterProvider.

This WriterProvider simply returns the Writer instant found in its state.

Author:
Tim Kral

Constructor Summary
BasicWriterProvider(Writer writer)
          Initalizes a BasicWriterProvider which will return the given Writer on any call to getWriter(GetUserInfoResult, DescribeSObjectResult).
 
Method Summary
 Writer getWriter(com.sforce.soap.partner.GetUserInfoResult userInfo, com.sforce.soap.partner.DescribeSObjectResult dsr)
          Returns a Java Writer for generated source code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicWriterProvider

public BasicWriterProvider(Writer writer)
Initalizes a BasicWriterProvider which will return the given Writer on any call to getWriter(GetUserInfoResult, DescribeSObjectResult).

Parameters:
writer - the Writer to return on a call to getWriter(GetUserInfoResult, DescribeSObjectResult)
Method Detail

getWriter

public Writer getWriter(com.sforce.soap.partner.GetUserInfoResult userInfo,
                        com.sforce.soap.partner.DescribeSObjectResult dsr)
Description copied from interface: WriterProvider
Returns a Java Writer for generated source code.

The Writer that is returned represents the destination for the source code that is generated from the given GetUserInfoResult object and DescribeSObjectResult object.

Specified by:
getWriter in interface WriterProvider
Parameters:
userInfo - the Force.com user who is running the code generation
dsr - the Force.com schema object for which code will be generated
Returns:
a non null Java Writer to which generated code will be written


Copyright © 2011. All Rights Reserved.