Class MemoizeExtension.Generator.MethodOverrider

java.lang.Object
com.google.auto.value.extension.memoized.processor.MemoizeExtension.Generator.MethodOverrider
Enclosing class:
MemoizeExtension.Generator

private final class MemoizeExtension.Generator.MethodOverrider extends Object
Determines the required fields and overriding method for a @Memoized method.
  • Field Details

    • method

      private final ExecutableElement method
    • override

      private final com.squareup.javapoet.MethodSpec.Builder override
    • cacheField

      private final com.squareup.javapoet.FieldSpec cacheField
    • fields

      private final com.google.common.collect.ImmutableList.Builder<com.squareup.javapoet.FieldSpec> fields
  • Constructor Details

  • Method Details

    • fields

      Iterable<com.squareup.javapoet.FieldSpec> fields()
      The fields that should be added to the subclass.
    • method

      com.squareup.javapoet.MethodSpec method()
      The overriding method that should be added to the subclass.
    • validate

      private void validate()
    • checkIllegalModifier

      private void checkIllegalModifier(Modifier modifier)
    • printMessage

      private void printMessage(Diagnostic.Kind kind, String format, Object... args)
    • overridesObjectMethod

      private boolean overridesObjectMethod(String methodName)
    • objectMethod

      private ExecutableElement objectMethod(String methodName)
    • pullDownMethodAnnotation

      private boolean pullDownMethodAnnotation(AnnotationMirror annotation)
    • buildCacheField

      private com.squareup.javapoet.FieldSpec buildCacheField(com.squareup.javapoet.TypeName type, String name)
      Builds a FieldSpec for use in property caching. Field will be private volatile and have the given type and name. If the @LazyInit annotation is available it is added as well.
    • strategy