Package com.google.auto.value.processor
Class ExtensionContext
java.lang.Object
com.google.auto.value.processor.ExtensionContext
- All Implemented Interfaces:
AutoValueExtension.Context
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.google.common.collect.ImmutableSet<ExecutableElement> private final ProcessingEnvironmentprivate final com.google.common.collect.ImmutableMap<String, ExecutableElement> private final TypeElement -
Constructor Summary
ConstructorsConstructorDescriptionExtensionContext(ProcessingEnvironment processingEnvironment, TypeElement typeElement, com.google.common.collect.ImmutableMap<String, ExecutableElement> properties, com.google.common.collect.ImmutableSet<ExecutableElement> abstractMethods) -
Method Summary
Modifier and TypeMethodDescriptionReturns the complete set of abstract methods defined in or inherited by the@AutoValueclass.Returns the annotated class that this generation cycle is based on.Returns the package name of the classes to be generated.Returns the processing environment of this generation cycle.Returns the ordered collection of properties to be generated by AutoValue.
-
Field Details
-
processingEnvironment
-
typeElement
-
properties
-
abstractMethods
-
-
Constructor Details
-
ExtensionContext
ExtensionContext(ProcessingEnvironment processingEnvironment, TypeElement typeElement, com.google.common.collect.ImmutableMap<String, ExecutableElement> properties, com.google.common.collect.ImmutableSet<ExecutableElement> abstractMethods)
-
-
Method Details
-
processingEnvironment
Description copied from interface:AutoValueExtension.ContextReturns the processing environment of this generation cycle. This can be used, among other things, to produce compilation warnings or errors, usingProcessingEnvironment.getMessager().- Specified by:
processingEnvironmentin interfaceAutoValueExtension.Context
-
packageName
Description copied from interface:AutoValueExtension.ContextReturns the package name of the classes to be generated.- Specified by:
packageNamein interfaceAutoValueExtension.Context
-
autoValueClass
Description copied from interface:AutoValueExtension.ContextReturns the annotated class that this generation cycle is based on.Given
@AutoValue public class Foo {...}, this will beFoo.- Specified by:
autoValueClassin interfaceAutoValueExtension.Context
-
properties
Description copied from interface:AutoValueExtension.ContextReturns the ordered collection of properties to be generated by AutoValue. Each key is a property name, and the corresponding value is the getter method for that property. For example, if propertybaris defined byabstract String getBar()then this map will have an entry mapping"bar"to theExecutableElementforgetBar().- Specified by:
propertiesin interfaceAutoValueExtension.Context
-
abstractMethods
Description copied from interface:AutoValueExtension.ContextReturns the complete set of abstract methods defined in or inherited by the@AutoValueclass. This includes all methods that define properties (likeabstract String getBar()), any abstracttoBuilder()method, and any other abstract method even if it has been consumed by this or another Extension.- Specified by:
abstractMethodsin interfaceAutoValueExtension.Context
-