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 a TypeElement.
  • 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

  • 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 class java.lang.Object
      @japkit.bodyBeforeIteratorCode
      return "#{src.simpleName} {"+
      @japkit.bodyCode
      "#{name}=" + #{name} +
      @japkit.bodySeparator
      ", " +
      @japkit.bodyAfterIteratorCode
      "}";