test_class.declarator: rule = new CompilationRule()
test_class.modifier: @Rule public
test_class.original_string: @Rule public CompilationRule rule = new CompilationRule();
test_class.type: CompilationRule
test_class.var_name: rule
test_class.declarator: extension = new AutoValueParcelExtension()
test_class.original_string: AutoValueParcelExtension extension = new AutoValueParcelExtension();
test_class.type: AutoValueParcelExtension
test_class.var_name: extension
test_class.declarator: elements
test_class.modifier: private
test_class.original_string: private Elements elements;
test_class.type: Elements
test_class.var_name: elements
test_class.declarator: processingEnvironment
test_class.modifier: private
test_class.original_string: private TestProcessingEnvironment processingEnvironment;
test_class.type: TestProcessingEnvironment
test_class.var_name: processingEnvironment
test_class.declarator: parcelable
test_class.modifier: private
test_class.original_string: private JavaFileObject parcelable;
test_class.type: JavaFileObject
test_class.var_name: parcelable
test_class.declarator: parcel
test_class.modifier: private
test_class.original_string: private JavaFileObject parcel;
test_class.type: JavaFileObject
test_class.var_name: parcel
test_class.declarator: nullable
test_class.modifier: private
test_class.original_string: private JavaFileObject nullable;
test_class.type: JavaFileObject
test_class.var_name: nullable
test_class.declarator: textUtils
test_class.modifier: private
test_class.original_string: private JavaFileObject textUtils;
test_class.type: JavaFileObject
test_class.var_name: textUtils
test_class.file: auto-value-parcel/src/test/java/com/ryanharter/auto/value/parcel/AutoValueParcelExtensionTest.java
test_class.identifier: AutoValueParcelExtensionTest
test_case.body: @Test public void acceptsParcelableProperties() throws Exception {
      TypeElement type = elements.getTypeElement(SampleTypeWithParcelable.class.getCanonicalName());
      AutoValueExtension.Context context = createContext(type);
  
      String generated = extension.generateClass(context, "Test_TypeWithParcelable", "SampleTypeWithParcelable", true);
      assertThat(generated).isNotNull();
    }
test_case.class_method_signature: AutoValueParcelExtensionTest.acceptsParcelableProperties()
test_case.full_signature: @Test public void acceptsParcelableProperties()
test_case.identifier: acceptsParcelableProperties
test_case.invocations: getTypeElement getCanonicalName createContext generateClass isNotNull assertThat
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void acceptsParcelableProperties()
focal_class.declarator: FAIL_EXPLOSIVELY = "avparcel.failExplosively"
focal_class.modifier: static final
focal_class.original_string: static final String FAIL_EXPLOSIVELY = "avparcel.failExplosively";
focal_class.type: String
focal_class.var_name: FAIL_EXPLOSIVELY
focal_class.file: auto-value-parcel/src/main/java/com/ryanharter/auto/value/parcel/AutoValueParcelExtension.java
focal_class.identifier: AutoValueParcelExtension
focal_class.class_method_signature: AutoValueParcelExtension.incrementalType(ProcessingEnvironment processingEnvironment)
focal_class.full_signature: @Override public IncrementalExtensionType incrementalType(ProcessingEnvironment processingEnvironment)
focal_class.identifier: incrementalType
focal_class.modifiers: @Override public
focal_class.parameters: (ProcessingEnvironment processingEnvironment)
focal_class.return: IncrementalExtensionType
focal_class.signature: IncrementalExtensionType incrementalType(ProcessingEnvironment processingEnvironment)
focal_class.class_method_signature: AutoValueParcelExtension.applicable(Context context)
focal_class.full_signature: @Override public boolean applicable(Context context)
focal_class.identifier: applicable
focal_class.modifiers: @Override public
focal_class.parameters: (Context context)
focal_class.return: boolean
focal_class.signature: boolean applicable(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.mustBeFinal(Context context)
focal_class.full_signature: @Override public boolean mustBeFinal(Context context)
focal_class.identifier: mustBeFinal
focal_class.modifiers: @Override public
focal_class.parameters: (Context context)
focal_class.return: boolean
focal_class.signature: boolean mustBeFinal(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.consumeProperties(Context context)
focal_class.full_signature: @Override public Set<String> consumeProperties(Context context)
focal_class.identifier: consumeProperties
focal_class.modifiers: @Override public
focal_class.parameters: (Context context)
focal_class.return: Set<String>
focal_class.signature: Set<String> consumeProperties(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.consumeMethods(Context context)
focal_class.full_signature: @Override public Set<ExecutableElement> consumeMethods(Context context)
focal_class.identifier: consumeMethods
focal_class.modifiers: @Override public
focal_class.parameters: (Context context)
focal_class.return: Set<ExecutableElement>
focal_class.signature: Set<ExecutableElement> consumeMethods(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.generateClass(Context context, String className, String classToExtend,
                                boolean isFinal)
focal_class.full_signature: @Override public String generateClass(Context context, String className, String classToExtend,
                                boolean isFinal)
focal_class.identifier: generateClass
focal_class.modifiers: @Override public
focal_class.parameters: (Context context, String className, String classToExtend,
                                boolean isFinal)
focal_class.return: String
focal_class.signature: String generateClass(Context context, String className, String classToExtend,
                                boolean isFinal)
focal_class.class_method_signature: AutoValueParcelExtension.needsContentDescriptor(Context context)
focal_class.full_signature: private static boolean needsContentDescriptor(Context context)
focal_class.identifier: needsContentDescriptor
focal_class.modifiers: private static
focal_class.parameters: (Context context)
focal_class.return: boolean
focal_class.signature: boolean needsContentDescriptor(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.findWriteToParcel(Context context)
focal_class.full_signature: private static ExecutableElement findWriteToParcel(Context context)
focal_class.identifier: findWriteToParcel
focal_class.modifiers: private static
focal_class.parameters: (Context context)
focal_class.return: ExecutableElement
focal_class.signature: ExecutableElement findWriteToParcel(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.findCreator(Context context)
focal_class.full_signature: private static VariableElement findCreator(Context context)
focal_class.identifier: findCreator
focal_class.modifiers: private static
focal_class.parameters: (Context context)
focal_class.return: VariableElement
focal_class.signature: VariableElement findCreator(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.readProperties(Context context)
focal_class.full_signature: private ImmutableList<Property> readProperties(Context context)
focal_class.identifier: readProperties
focal_class.modifiers: private
focal_class.parameters: (Context context)
focal_class.return: ImmutableList<Property>
focal_class.signature: ImmutableList<Property> readProperties(Context context)
focal_class.class_method_signature: AutoValueParcelExtension.validateProperties(ProcessingEnvironment env, List<Property> properties)
focal_class.full_signature: private boolean validateProperties(ProcessingEnvironment env, List<Property> properties)
focal_class.identifier: validateProperties
focal_class.modifiers: private
focal_class.parameters: (ProcessingEnvironment env, List<Property> properties)
focal_class.return: boolean
focal_class.signature: boolean validateProperties(ProcessingEnvironment env, List<Property> properties)
focal_class.class_method_signature: AutoValueParcelExtension.generateConstructor(List<Property> properties)
focal_class.full_signature:  MethodSpec generateConstructor(List<Property> properties)
focal_class.identifier: generateConstructor
focal_class.parameters: (List<Property> properties)
focal_class.return: MethodSpec
focal_class.signature: MethodSpec generateConstructor(List<Property> properties)
focal_class.class_method_signature: AutoValueParcelExtension.generateCreator(ProcessingEnvironment env, TypeName autoValueType,
        List<Property> properties, TypeName type, Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.full_signature:  FieldSpec generateCreator(ProcessingEnvironment env, TypeName autoValueType,
        List<Property> properties, TypeName type, Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.identifier: generateCreator
focal_class.parameters: (ProcessingEnvironment env, TypeName autoValueType,
        List<Property> properties, TypeName type, Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.return: FieldSpec
focal_class.signature: FieldSpec generateCreator(ProcessingEnvironment env, TypeName autoValueType,
        List<Property> properties, TypeName type, Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.class_method_signature: AutoValueParcelExtension.generateWriteToParcel(ProcessingEnvironment env, List<Property> properties,
        Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.full_signature:  MethodSpec generateWriteToParcel(ProcessingEnvironment env, List<Property> properties,
        Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.identifier: generateWriteToParcel
focal_class.parameters: (ProcessingEnvironment env, List<Property> properties,
        Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.return: MethodSpec
focal_class.signature: MethodSpec generateWriteToParcel(ProcessingEnvironment env, List<Property> properties,
        Map<TypeMirror, FieldSpec> typeAdapters)
focal_class.class_method_signature: AutoValueParcelExtension.createSuppressUncheckedWarningAnnotation()
focal_class.full_signature: private static AnnotationSpec createSuppressUncheckedWarningAnnotation()
focal_class.identifier: createSuppressUncheckedWarningAnnotation
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: AnnotationSpec
focal_class.signature: AnnotationSpec createSuppressUncheckedWarningAnnotation()
focal_class.class_method_signature: AutoValueParcelExtension.getTypeAdapters(List<Property> properties)
focal_class.full_signature: private ImmutableMap<TypeMirror, FieldSpec> getTypeAdapters(List<Property> properties)
focal_class.identifier: getTypeAdapters
focal_class.modifiers: private
focal_class.parameters: (List<Property> properties)
focal_class.return: ImmutableMap<TypeMirror, FieldSpec>
focal_class.signature: ImmutableMap<TypeMirror, FieldSpec> getTypeAdapters(List<Property> properties)
focal_class.class_method_signature: AutoValueParcelExtension.generateDescribeContents()
focal_class.full_signature:  MethodSpec generateDescribeContents()
focal_class.identifier: generateDescribeContents
focal_class.parameters: ()
focal_class.return: MethodSpec
focal_class.signature: MethodSpec generateDescribeContents()
focal_class.superclass: extends AutoValueExtension
focal_method.body: @Override
    public String generateClass(Context context, String className, String classToExtend,
                                boolean isFinal) {
      ProcessingEnvironment env = context.processingEnvironment();
      TypeName autoValueType =
          TypeName.get(env.getTypeUtils().erasure(context.autoValueClass().asType()));
  
      ImmutableList<Property> properties = readProperties(context);
      if (!validateProperties(env, properties)) {
        return null;
      }
  
      ImmutableMap<TypeMirror, FieldSpec> typeAdapters = getTypeAdapters(properties);
  
      TypeName type = ClassName.get(context.packageName(), className);
      TypeSpec.Builder subclass = TypeSpec.classBuilder(className)
          .addModifiers(FINAL)
          .addMethod(generateConstructor(properties))
          .addMethod(generateWriteToParcel(env, properties, typeAdapters));
  
      GeneratedAnnotations.generatedAnnotation(env.getElementUtils(), env.getSourceVersion())
          .map(
              annotation ->
                  AnnotationSpec.builder(ClassName.get(annotation))
                      .addMember("value", "$S", getClass().getName())
                      .build())
          .ifPresent(subclass::addAnnotation);
  
      if (!typeAdapters.isEmpty()) {
        for (FieldSpec field : typeAdapters.values()) {
          subclass.addField(field);
        }
      }
  
      subclass.addField(generateCreator(env, autoValueType, properties, type, typeAdapters));
  
      ClassName superClass = ClassName.get(context.packageName(), classToExtend);
      List<? extends TypeParameterElement> tpes = context.autoValueClass().getTypeParameters();
      if (tpes.isEmpty()) {
        subclass.superclass(superClass);
      } else {
        TypeName[] superTypeVariables = new TypeName[tpes.size()];
        for (int i = 0, tpesSize = tpes.size(); i < tpesSize; i++) {
          TypeParameterElement tpe = tpes.get(i);
          subclass.addTypeVariable(TypeVariableName.get(tpe));
          superTypeVariables[i] = TypeVariableName.get(tpe.getSimpleName().toString());
        }
        subclass.superclass(ParameterizedTypeName.get(superClass, superTypeVariables));
      }
      if (needsContentDescriptor(context)) {
        subclass.addMethod(generateDescribeContents());
      }
  
      JavaFile javaFile = JavaFile.builder(context.packageName(), subclass.build()).build();
      return javaFile.toString();
    }
focal_method.class_method_signature: AutoValueParcelExtension.generateClass(Context context, String className, String classToExtend,
                                boolean isFinal)
focal_method.full_signature: @Override public String generateClass(Context context, String className, String classToExtend,
                                boolean isFinal)
focal_method.identifier: generateClass
focal_method.invocations: processingEnvironment get erasure getTypeUtils asType autoValueClass readProperties validateProperties getTypeAdapters get packageName addMethod addMethod addModifiers classBuilder generateConstructor generateWriteToParcel ifPresent map generatedAnnotation getElementUtils getSourceVersion build addMember builder get getName getClass isEmpty values addField addField generateCreator get packageName getTypeParameters autoValueClass isEmpty superclass size size get addTypeVariable get get toString getSimpleName superclass get needsContentDescriptor addMethod generateDescribeContents build builder packageName build toString
focal_method.modifiers: @Override public
focal_method.parameters: (Context context, String className, String classToExtend,
                                boolean isFinal)
focal_method.return: String
focal_method.signature: String generateClass(Context context, String className, String classToExtend,
                                boolean isFinal)