Source:
protected void processAnnotatedFieldsOrMethods(@NotNull final RoundEnvironment roundEnvironment, @NotNull Map<TypeElement, StorIOSQLiteTypeMeta> annotatedClasses) { final Set<? extends Element> elementsAnnotatedWithStorIOSQLiteColumn = roundEnvironment.getElementsAnnotatedWith(StorIOSQLiteColumn.class); for (final Element annotatedFieldElement : elementsAnnotatedWithStorIOSQLiteColumn) { try { validateAnnotatedFieldOrMethod(annotatedFieldElement); final StorIOSQLiteColumnMeta storIOSQLiteColumnMeta = processAnnotatedFieldOrMethod(annotatedFieldElement); final StorIOSQLiteTypeMeta storIOSQLiteTypeMeta = annotatedClasses.get(storIOSQLiteColumnMeta.enclosingElement); if (storIOSQLiteTypeMeta == null) { throw new ProcessingException(annotatedFieldElement, "Field marked with " + StorIOSQLiteColumn.class.getSimpleName() + " annotation should be placed in class marked by " + StorIOSQLiteType.class.getSimpleName() + " annotation" ); } if (storIOSQLiteTypeMeta.columns.containsKey(storIOSQLiteColumnMeta.storIOColumn.name())) { throw new ProcessingException(annotatedFieldElement, "Column name already used in this class"); } if ((storIOSQLiteTypeMeta.needCreator && !storIOSQLiteColumnMeta.isMethod()) || (!storIOSQLiteTypeMeta.needCreator && storIOSQLiteColumnMeta.isMethod() && !storIOSQLiteTypeMeta.columns.isEmpty())) { throw new ProcessingException(annotatedFieldElement, "Can't apply" + StorIOSQLiteColumn.class.getSimpleName() + " annotation to both fields and methods in a same class" ); } if (!storIOSQLiteTypeMeta.needCreator && storIOSQLiteColumnMeta.isMethod()) { storIOSQLiteTypeMeta.needCreator = true; } storIOSQLiteTypeMeta.columns.put(storIOSQLiteColumnMeta.storIOColumn.name(), storIOSQLiteColumnMeta); } catch (SkipNotAnnotatedClassWithAnnotatedParentException e) { e.printStackTrace(); } } }

Target:
protected void processAnnotatedFieldsOrMethods(@NotNull final RoundEnvironment roundEnvironment, @NotNull Map<TypeElement, StorIOSQLiteTypeMeta> annotatedClasses) { final Set<? extends Element> elementsAnnotatedWithStorIOSQLiteColumn = roundEnvironment.getElementsAnnotatedWith(StorIOSQLiteColumn.class); for (final Element annotatedFieldElement : elementsAnnotatedWithStorIOSQLiteColumn) { try { validateAnnotatedFieldOrMethod(annotatedFieldElement); final StorIOSQLiteColumnMeta storIOSQLiteColumnMeta = processAnnotatedFieldOrMethod(annotatedFieldElement); final StorIOSQLiteTypeMeta storIOSQLiteTypeMeta = annotatedClasses.get(storIOSQLiteColumnMeta.enclosingElement); if (storIOSQLiteTypeMeta == null) { throw new ProcessingException(annotatedFieldElement, "Field marked with " + StorIOSQLiteColumn.class.getSimpleName() + " annotation should be placed in class marked by " + StorIOSQLiteType.class.getSimpleName() + " annotation" ); } if (storIOSQLiteTypeMeta.columns.containsKey(storIOSQLiteColumnMeta.storIOColumn.name())) { throw new ProcessingException(annotatedFieldElement, "Column name already used in this class"); } if ((storIOSQLiteTypeMeta.needCreator && !storIOSQLiteColumnMeta.isMethod()) || (!storIOSQLiteTypeMeta.needCreator && storIOSQLiteColumnMeta.isMethod() && !storIOSQLiteTypeMeta.columns.isEmpty())) { throw new ProcessingException(annotatedFieldElement, "Can't apply" + StorIOSQLiteColumn.class.getSimpleName() + " annotation to both fields and methods in a same class" ); } if (!storIOSQLiteTypeMeta.needCreator && storIOSQLiteColumnMeta.isMethod()) { storIOSQLiteTypeMeta.needCreator = true; } storIOSQLiteTypeMeta.columns.put(storIOSQLiteColumnMeta.storIOColumn.name(), storIOSQLiteColumnMeta); } catch (SkipNotAnnotatedClassWithAnnotatedParentException e) { messager.printMessage(WARNING, e.getMessage()); } } }