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 classprivate classprivate final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.squareup.javapoet.FieldSpecprivate final com.google.common.collect.ImmutableList.Builder<com.squareup.javapoet.FieldSpec> private final ExecutableElementprivate final com.squareup.javapoet.MethodSpec.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate com.squareup.javapoet.FieldSpecbuildCacheField(com.squareup.javapoet.TypeName type, String name) Builds aFieldSpecfor use in property caching.private voidcheckIllegalModifier(Modifier modifier) (package private) Iterable<com.squareup.javapoet.FieldSpec> fields()The fields that should be added to the subclass.(package private) com.squareup.javapoet.MethodSpecmethod()The overriding method that should be added to the subclass.private ExecutableElementobjectMethod(String methodName) private booleanoverridesObjectMethod(String methodName) private voidprintMessage(Diagnostic.Kind kind, String format, Object... args) private booleanpullDownMethodAnnotation(AnnotationMirror annotation) (package private) MemoizeExtension.Generator.MethodOverrider.InitializationStrategystrategy()private voidvalidate()
-
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 aFieldSpecfor use in property caching. Field will beprivate volatileand have the given type and name. If the @LazyInit annotation is available it is added as well. -
strategy
-