jedi.annotation.writer.method
Class AbstractFactoryMethodWriter
java.lang.Object
jedi.annotation.writer.method.AbstractFactoryMethodWriter
- All Implemented Interfaces:
- ClosureFragmentWriter, FactoryMethodWriter
- Direct Known Subclasses:
- AbstractBasicFactoryMethodWriter, AbstractProxyFactoryMethodWriter
public abstract class AbstractFactoryMethodWriter
- extends Object
- implements ClosureFragmentWriter, FactoryMethodWriter
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RECEIVER_PARAMETER_NAME
public static final String RECEIVER_PARAMETER_NAME
- See Also:
- Constant Field Values
options
protected final ProcessorOptions options
AbstractFactoryMethodWriter
public AbstractFactoryMethodWriter(ProcessorOptions options)
canHandle
public final boolean canHandle(Annotateable method)
- Specified by:
canHandle in interface FactoryMethodWriter
checkPrecondition
protected final void checkPrecondition(boolean precondition,
String message)
execute
public final void execute(Annotateable method)
- Specified by:
execute in interface FactoryMethodWriter
getCorrespondingFieldName
protected String getCorrespondingFieldName(String parameterName)
getDelegateMethodDeclaringTypeWithoutBounds
protected final String getDelegateMethodDeclaringTypeWithoutBounds()
getDelegateMethodReturnType
protected final String getDelegateMethodReturnType()
getExecuteMethodParameters
protected final List<Attribute> getExecuteMethodParameters()
getExecuteMethodParameters
protected abstract List<Attribute> getExecuteMethodParameters(Annotateable method)
getExecuteMethodReturnType
protected String getExecuteMethodReturnType()
getFactoryMethodAdditionalFormalParameters
protected abstract Collection<Attribute> getFactoryMethodAdditionalFormalParameters()
getFactoryMethodBasicParameters
protected abstract Collection<Attribute> getFactoryMethodBasicParameters()
getFactoryMethodName
public final String getFactoryMethodName()
- Specified by:
getFactoryMethodName in interface ClosureFragmentWriter
getFactoryMethodNameRequiredSuffix
protected String getFactoryMethodNameRequiredSuffix()
getFactoryMethodNameReturnTypeSuffix
protected String getFactoryMethodNameReturnTypeSuffix()
getFactoryMethodParameters
protected List<Attribute> getFactoryMethodParameters()
getMethod
protected Annotateable getMethod()
getOneParameterClosureClass
protected abstract Class<?> getOneParameterClosureClass()
getWriter
protected JavaWriter getWriter()
hasCorrectReturnType
protected abstract boolean hasCorrectReturnType(Annotateable method)
initialise
public final void initialise(JavaWriter writer,
FactoryType factoryType)
- Specified by:
initialise in interface FactoryMethodWriter
isReturnRequired
protected boolean isReturnRequired()
setReceiverInvocationWriter
protected final void setReceiverInvocationWriter(ReceiverInvocationWriter receiverInvocationWriter)
writeClosureDeclaration
public final void writeClosureDeclaration()
- Specified by:
writeClosureDeclaration in interface ClosureFragmentWriter
writeClosureTypes
protected void writeClosureTypes()
writeFactoryMethodActualParameters
public final void writeFactoryMethodActualParameters()
- Specified by:
writeFactoryMethodActualParameters in interface ClosureFragmentWriter
writeGenericTypeParameters
public void writeGenericTypeParameters()
writeLocalClass
public final void writeLocalClass(String name)
- Specified by:
writeLocalClass in interface ClosureFragmentWriter
Copyright © 2011. All Rights Reserved.