com.advancedpwr.record.methods
Class BuildMethodWriter

java.lang.Object
  extended by com.advancedpwr.record.methods.BuildMethodWriter
Direct Known Subclasses:
AbstractMultiBuilder, AbstractPrimitiveBuilder, CalendarBuilder, CollectionBuilder, DateBuilder, InstanceMethodBuilder, LocaleBuilder, MockMethodBuilder, URLBuilder

public class BuildMethodWriter
extends Object


Field Summary
protected  AccessPath fieldAccessPath
           
protected  ClassWriter fieldClassWriter
           
protected  MethodBuilderFactory fieldFactory
           
protected  String fieldScope
           
 
Constructor Summary
BuildMethodWriter()
           
 
Method Summary
 void buildMethod()
           
 ClassWriter closeBrace()
           
protected  BuildMethodWriter createMethodBuilder(AccessPath result)
           
protected  Set<Class> declaredExceptions()
           
protected  String depth()
           
protected  String exceptions()
           
protected  String formattedExceptionList()
           
 AccessPath getAccessPath()
           
 ClassWriter getClassWriter()
           
 MethodBuilderFactory getFactory()
           
 InstanceTree getInstanceTree()
           
protected  boolean hasDeclaredException()
           
protected  boolean hasDefaultConstructor()
           
protected  String instanceName()
           
protected  String instanceType()
           
protected  void newLine()
           
 ClassWriter openBrace()
           
protected  String populator(String inInstanceName)
           
 String resultBuilder()
           
protected  String returnType()
           
protected  String scope()
           
 void setAccessPath(AccessPath result)
           
 void setClassWriter(ClassWriter classWriter)
           
 void setFactory(MethodBuilderFactory methodBuilderFactory)
           
 void setScopeProtected()
           
 void setScopePublic()
           
protected  void wrapException(String line)
           
 void write(String inString)
           
protected  void writeBuilderMethods()
           
protected  void writeField()
           
protected  void writeIfNotNullReturnInstance()
           
protected  void writeInstance()
           
 void writeLine(String inString)
           
protected  void writeMethodSignature()
           
protected  void writePopulators()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fieldAccessPath

protected AccessPath fieldAccessPath

fieldClassWriter

protected ClassWriter fieldClassWriter

fieldScope

protected String fieldScope

fieldFactory

protected MethodBuilderFactory fieldFactory
Constructor Detail

BuildMethodWriter

public BuildMethodWriter()
Method Detail

getFactory

public MethodBuilderFactory getFactory()

setFactory

public void setFactory(MethodBuilderFactory methodBuilderFactory)

buildMethod

public void buildMethod()

writeMethodSignature

protected void writeMethodSignature()

exceptions

protected String exceptions()

formattedExceptionList

protected String formattedExceptionList()

declaredExceptions

protected Set<Class> declaredExceptions()

hasDeclaredException

protected boolean hasDeclaredException()

writeInstance

protected void writeInstance()

hasDefaultConstructor

protected boolean hasDefaultConstructor()

writeField

protected void writeField()

writeBuilderMethods

protected void writeBuilderMethods()

scope

protected String scope()

setScopePublic

public void setScopePublic()

setScopeProtected

public void setScopeProtected()

writePopulators

protected void writePopulators()

populator

protected String populator(String inInstanceName)

getInstanceTree

public InstanceTree getInstanceTree()

createMethodBuilder

protected BuildMethodWriter createMethodBuilder(AccessPath result)

getClassWriter

public ClassWriter getClassWriter()

setClassWriter

public void setClassWriter(ClassWriter classWriter)

getAccessPath

public AccessPath getAccessPath()

setAccessPath

public void setAccessPath(AccessPath result)

closeBrace

public ClassWriter closeBrace()

openBrace

public ClassWriter openBrace()

writeLine

public void writeLine(String inString)

write

public void write(String inString)

resultBuilder

public String resultBuilder()

depth

protected String depth()

instanceType

protected String instanceType()

instanceName

protected String instanceName()

returnType

protected String returnType()

newLine

protected void newLine()

writeIfNotNullReturnInstance

protected void writeIfNotNullReturnInstance()

wrapException

protected void wrapException(String line)


Copyright © 2011 Advanced Power Co. All Rights Reserved.