Class MemberNameExampleGen

java.lang.Object
de.japkit.test.members.common.name.MemberNameExampleGen

@MemberNameTrigger(shadow=true)
@Generated(src="de.japkit.test.members.common.name.MemberNameExample")
public class MemberNameExampleGen
extends java.lang.Object
The generated class for the example.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) java.lang.String memberNameExample1
    The name of the generated field is determined by evaluating the Java EL expression given by nameExpr.
    (package private) java.lang.String memberNameExample2
    The name of the generated field is determined by evaluating the Java EL expression given by an $-delimited Java EL expression in the template for the member. "_" must be used instead of ".".
    (package private) java.lang.String memberNameExample3
    Src is always implicit in expressions and can be omitted.
    (package private) java.lang.String prefixMemberNameExample2
    Here, toFirstUpper will be applied automatically, since the expression is not at the beginning of the member name.
    (package private) java.lang.String someString1
    The name of the generated field is copied from the template.
    (package private) java.lang.String someString2
    The name of the generated field is determined by the annotation value name.
    (package private) java.lang.String srcField1Copy
    Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample.
    (package private) java.lang.String srcField2Copy
    Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample.
  • Constructor Summary

    Constructors 
    Constructor Description
    MemberNameExampleGen()  
  • Method Summary

    Methods inherited from class java.lang.Object

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

    • someString1

      java.lang.String someString1
      The name of the generated field is copied from the template. Here "someString1".
    • someString2

      java.lang.String someString2
      The name of the generated field is determined by the annotation value name. Here it is "someString2".
    • memberNameExample1

      java.lang.String memberNameExample1
      The name of the generated field is determined by evaluating the Java EL expression given by nameExpr.

      Here it is "memberNameExample1", since the src is the TypeElement for the annotated class SourceExample, and its TypeElement#getSimpleName() is "SourceExample".

    • memberNameExample2

      java.lang.String memberNameExample2
      The name of the generated field is determined by evaluating the Java EL expression given by an $-delimited Java EL expression in the template for the member. "_" must be used instead of ".". Note that this allows only for simple expressions.

      TODO: Shouldn't we apply toFirstLower here automatically?

      The resulting name is "memberNameExample2".

    • prefixMemberNameExample2

      java.lang.String prefixMemberNameExample2
      Here, toFirstUpper will be applied automatically, since the expression is not at the beginning of the member name. (For demonstration purposes we apply toFirstLower, to transform "MemberNameExample" into "memberNameExample"). The resulting name is "prefixMemberNameExample2".
    • memberNameExample3

      java.lang.String memberNameExample3
      Src is always implicit in expressions and can be omitted.

      TODO: Shouldn't we apply toFirstLower here automatically?

      The resulting name is "memberNameExample3".

    • srcField1Copy

      java.lang.String srcField1Copy
      Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample. Thus, there is a field generated for every field in this list. The src in the name expression is each field in that list. Thus, the resulting fields are "srcField1Copy" and "srcField2Copy".
    • srcField2Copy

      java.lang.String srcField2Copy
      Here, the src is set to the list of fields of the TypeElement for the annotated class SourceExample. Thus, there is a field generated for every field in this list. The src in the name expression is each field in that list. Thus, the resulting fields are "srcField1Copy" and "srcField2Copy".
  • Constructor Details