Package de.japkit.test.members
Class ToStringTemplate
java.lang.Object
de.japkit.test.members.ToStringTemplate
@Template
@RuntimeMetadata
public class ToStringTemplate
extends java.lang.Object
A template that adds a simple toString method to the generated class.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ToStringTemplate.fields
A function to get the fields of aTypeElement
. -
Constructor Summary
Constructors Constructor Description ToStringTemplate()
-
Method Summary
Modifier and Type Method Description java.lang.String
toString()
This method prints the field values of the generated class.
-
Constructor Details
-
ToStringTemplate
public ToStringTemplate()
-
-
Method Details
-
toString
@Method(bodyIterator="#{genClass.fields()}", bodyIndentAfterLinebreak=true) public java.lang.String toString()This method prints the field values of the generated class.- Overrides:
toString
in classjava.lang.Object
- @japkit.bodyBeforeIteratorCode
- return "#{src.simpleName} {"+
- @japkit.bodyCode
- "#{name}=" + #{name} +
- @japkit.bodySeparator
- ", " +
- @japkit.bodyAfterIteratorCode
- "}";
-