Class MemoizeExtension.Generator.MethodOverrider
java.lang.Object
com.google.auto.value.extension.memoized.processor.MemoizeExtension.Generator.MethodOverrider
- Enclosing class:
MemoizeExtension.Generator
Determines the required fields and overriding method for a
method.
invalid reference
@Memoized
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
private class
private final class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.squareup.javapoet.FieldSpec
private final com.google.common.collect.ImmutableList.Builder
<com.squareup.javapoet.FieldSpec> private final ExecutableElement
private final com.squareup.javapoet.MethodSpec.Builder
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate com.squareup.javapoet.FieldSpec
buildCacheField
(com.squareup.javapoet.TypeName type, String name) Builds aFieldSpec
for use in property caching.private void
checkIllegalModifier
(Modifier modifier) (package private) Iterable
<com.squareup.javapoet.FieldSpec> fields()
The fields that should be added to the subclass.(package private) com.squareup.javapoet.MethodSpec
method()
The overriding method that should be added to the subclass.private ExecutableElement
objectMethod
(String methodName) private boolean
overridesObjectMethod
(String methodName) private void
printMessage
(Diagnostic.Kind kind, String format, Object... args) private boolean
pullDownMethodAnnotation
(AnnotationMirror annotation) (package private) MemoizeExtension.Generator.MethodOverrider.InitializationStrategy
strategy()
private void
validate()
-
Field Details
-
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
-
MethodOverrider
MethodOverrider(ExecutableElement method)
-
-
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
-
printMessage
-
overridesObjectMethod
-
objectMethod
-
pullDownMethodAnnotation
-
buildCacheField
private com.squareup.javapoet.FieldSpec buildCacheField(com.squareup.javapoet.TypeName type, String name) Builds aFieldSpec
for use in property caching. Field will beprivate volatile
and have the given type and name. If the @LazyInit annotation is available it is added as well. -
strategy
-