Class SourceExampleGen

java.lang.Object
de.japkit.test.members.common.source.SourceExampleGen

@SourceTrigger(shadow=true)
@Generated(src="de.japkit.test.members.common.source.SourceExample")
public class SourceExampleGen
extends java.lang.Object
The generated class for the example.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) java.lang.String sourceExample
    If no src is set, the src variable is the same as the one of the surrounding template.
    (package private) java.lang.String srcField1Copy1
    Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample.
    (package private) java.lang.String srcField1Copy2
    Since filtering is quite common for a src collection, the filter condition can also be provided as srcFilter.
    (package private) java.lang.String srcField1Copy3
    The src variable is always implicit in expressions, so it can be omitted.
    (package private) java.lang.String srcField1Copy4
    Also, a function can be called to determine the source.
    (package private) java.lang.String srcField1Copy5
    Also, a function can be called to filter the source.
    (package private) java.lang.String srcField1Copy6
    A field for every element in the src collection of FieldAndMethod template.
    (package private) int srcField2Copy1
    Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample.
    (package private) int srcField2Copy2
    Since filtering is quite common for a src collection, the filter condition can also be provided as srcFilter.
    (package private) int srcField2Copy3
    The src variable is always implicit in expressions, so it can be omitted.
    (package private) int srcField2Copy4
    Also, a function can be called to determine the source.
    (package private) int srcField2Copy5
    Also, a function can be called to filter the source.
    (package private) int srcField2Copy6
    A field for every element in the src collection of FieldAndMethod template.
  • Constructor Summary

    Constructors 
    Constructor Description
    SourceExampleGen()  
  • Method Summary

    Modifier and Type Method Description
    (package private) void setSrcField1​(java.lang.String srcField1)
    A method for every element in the src collection of FieldAndMethod template.
    (package private) void setSrcField2​(int srcField2)
    A method for every element in the src collection of FieldAndMethod template.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • srcField1Copy6

      java.lang.String srcField1Copy6
      A field for every element in the src collection of FieldAndMethod template.
    • srcField2Copy6

      int srcField2Copy6
      A field for every element in the src collection of FieldAndMethod template.
    • sourceExample

      java.lang.String sourceExample
      If no src is set, the src variable is the same as the one of the surrounding template. Since this is the Clazz template here, the src is the TypeElement for the class annotated with the trigger annotation.

      So, the resulting field name is "sourceExample", since the src is the TypeElement for the annotated class SourceExample, and its TypeElement#getSimpleName() is "SourceExample".

    • srcField1Copy1

      java.lang.String srcField1Copy1
      Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample. For a src of a collection type, the member template is applied for every element. Thus, there is a field generated for every field in this list. The resulting fields are "srcField1Copy" and "srcField2Copy".

      The new src hides the original one, which was the TypeElement for the annotated class SourceExample. If generating the member is done, the original src is restored again. In other words, each member is generated within a new scope with its own value for src and potentially other variables.

    • srcField2Copy1

      int srcField2Copy1
      Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample. For a src of a collection type, the member template is applied for every element. Thus, there is a field generated for every field in this list. The resulting fields are "srcField1Copy" and "srcField2Copy".

      The new src hides the original one, which was the TypeElement for the annotated class SourceExample. If generating the member is done, the original src is restored again. In other words, each member is generated within a new scope with its own value for src and potentially other variables.

    • srcField1Copy2

      java.lang.String srcField1Copy2
      Since filtering is quite common for a src collection, the filter condition can also be provided as srcFilter.
    • srcField2Copy2

      int srcField2Copy2
      Since filtering is quite common for a src collection, the filter condition can also be provided as srcFilter.
    • srcField1Copy3

      java.lang.String srcField1Copy3
      The src variable is always implicit in expressions, so it can be omitted.
    • srcField2Copy3

      int srcField2Copy3
      The src variable is always implicit in expressions, so it can be omitted.
    • srcField1Copy4

      java.lang.String srcField1Copy4
      Also, a function can be called to determine the source.
    • srcField2Copy4

      int srcField2Copy4
      Also, a function can be called to determine the source.
    • srcField1Copy5

      java.lang.String srcField1Copy5
      Also, a function can be called to filter the source.
    • srcField2Copy5

      int srcField2Copy5
      Also, a function can be called to filter the source.
  • Constructor Details

  • Method Details

    • setSrcField1

      void setSrcField1​(java.lang.String srcField1)
      A method for every element in the src collection of FieldAndMethod template.
    • setSrcField2

      void setSrcField2​(int srcField2)
      A method for every element in the src collection of FieldAndMethod template.