Class SimpleMethod


  • public final class SimpleMethod
    extends java.lang.Object
    A method on an @AutoValue or AutoOneOf class that has no specific attached information, such as a toBuilder() method, or a build() method, where only the name and access type is needed in context.

    It implements JavaBean-style getters which means it can be referenced from templates, for example $method.access. This template access means that the class and its getters must be public.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String access  
      private java.lang.String name  
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleMethod​(javax.lang.model.element.ExecutableElement method)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static java.lang.String access​(javax.lang.model.element.ExecutableElement method)
      Returns an appropriate string to be used in code for the access specification of the given method.
      java.lang.String getAccess()  
      java.lang.String getName()  
      • Methods inherited from class java.lang.Object

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

      • access

        private final java.lang.String access
      • name

        private final java.lang.String name
    • Constructor Detail

      • SimpleMethod

        SimpleMethod​(javax.lang.model.element.ExecutableElement method)
    • Method Detail

      • getAccess

        public java.lang.String getAccess()
      • getName

        public java.lang.String getName()
      • access

        static java.lang.String access​(javax.lang.model.element.ExecutableElement method)
        Returns an appropriate string to be used in code for the access specification of the given method. This will be public or protected followed by a space, or the empty string for default access.