|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.commonclipse.Generator net.sf.commonclipse.ToStringGenerator
public final class ToStringGenerator
Generator for toString() methods.
Method Summary | |
---|---|
protected void |
addImports(org.eclipse.jdt.core.IType type)
Adds required imports to type. |
protected java.lang.String |
createMethod(org.eclipse.jdt.core.IType type)
Creates the method for the ITYPE type. |
protected org.eclipse.jdt.core.IMethod |
getExistingMethod(org.eclipse.jdt.core.IType type)
Returns the existing method. |
protected java.lang.String |
getFieldAppender(java.lang.String fieldName,
java.lang.String accessor)
get the "append" statement for a field. |
static Generator |
getInstance()
Returns the ToStringGenerator instance. |
protected java.lang.String |
getMethodName()
Returns the generated method name. |
Methods inherited from class net.sf.commonclipse.Generator |
---|
buildAppenderList, buildFieldMap, computeIndent, generate, generateMethod, getIndentUsed, isExcluded, validate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Generator getInstance()
protected java.lang.String getMethodName()
Generator
getMethodName
in class Generator
Generator.getMethodName()
protected void addImports(org.eclipse.jdt.core.IType type) throws org.eclipse.jdt.core.JavaModelException
Generator
addImports
in class Generator
type
- IType
org.eclipse.jdt.core.JavaModelException
- exception in adding importsGenerator.addImports(org.eclipse.jdt.core.IType)
protected java.lang.String createMethod(org.eclipse.jdt.core.IType type) throws org.eclipse.jdt.core.JavaModelException
Generator
createMethod
in class Generator
type
- Itype
org.eclipse.jdt.core.JavaModelException
- exception in creating methodGenerator.createMethod(org.eclipse.jdt.core.IType)
protected org.eclipse.jdt.core.IMethod getExistingMethod(org.eclipse.jdt.core.IType type)
Generator
getExistingMethod
in class Generator
type
- IType
Generator.getExistingMethod(org.eclipse.jdt.core.IType)
protected java.lang.String getFieldAppender(java.lang.String fieldName, java.lang.String accessor)
Generator
getFieldAppender
in class Generator
fieldName
- name of the fieldaccessor
- can be different for fieldname
Generator.getFieldAppender(java.lang.String, java.lang.String)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |