// Path: observable-cache-service-processor-api/src/main/java/com/github/aleksandermielczarek/observablecache/service/processor/api/method/base/BaseMethod.java
// public interface BaseMethod extends WritableMethod {
// 
//     default boolean isBaseMethod(ExecutableElement method, ProcessingEnvironment processingEnvironment) {
//         if (!method.getParameters().isEmpty()) {
//             return false;
//         }
//         TypeElement returnedElement = (TypeElement) processingEnvironment.getTypeUtils().asElement(method.getReturnType());
//         if (!returnedElement.getQualifiedName().toString().contains(returnedType())) {
//             return false;
//         }
//         return true;
//     }
// 
//     default String keyName(ExecutableElement method) {
//         String camelCaseName = method.getSimpleName().toString();
//         return CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, camelCaseName);
//     }
// 
//     default String keyValue(TypeElement type, ExecutableElement method) {
//         return type.getQualifiedName().toString() + "." + method.getSimpleName().toString();
//     }
// 
//     @Override
//     default void writeMethod(TypeSpec.Builder builder, ExecutableElement method, String keyName) {
//         builder.addMethod(MethodSpec.overriding(method)
//                 .addStatement("return observableCache." + cacheMethod() + "(" + keyName + ")")
//                 .build());
//     }
// 
//     String returnedType();
// 
//     String cacheMethod();
// }


import com.github.aleksandermielczarek.observablecache.service.processor.api.method.base.BaseMethod;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeSpec;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;
package com.github.aleksandermielczarek.observablecache.service.processor.api.method.extend;




/**
 * Created by Aleksander Mielczarek on 06.11.2016.
 */

public interface FromCacheMethod extends ExtendMethod {

    @Override
// Path: observable-cache-service-processor-api/src/main/java/com/github/aleksandermielczarek/observablecache/service/processor/api/method/base/BaseMethod.java
// public interface BaseMethod extends WritableMethod {
// 
//     default boolean isBaseMethod(ExecutableElement method, ProcessingEnvironment processingEnvironment) {
//         if (!method.getParameters().isEmpty()) {
//             return false;
//         }
//         TypeElement returnedElement = (TypeElement) processingEnvironment.getTypeUtils().asElement(method.getReturnType());
//         if (!returnedElement.getQualifiedName().toString().contains(returnedType())) {
//             return false;
//         }
//         return true;
//     }
// 
//     default String keyName(ExecutableElement method) {
//         String camelCaseName = method.getSimpleName().toString();
//         return CaseFormat.LOWER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, camelCaseName);
//     }
// 
//     default String keyValue(TypeElement type, ExecutableElement method) {
//         return type.getQualifiedName().toString() + "." + method.getSimpleName().toString();
//     }
// 
//     @Override
//     default void writeMethod(TypeSpec.Builder builder, ExecutableElement method, String keyName) {
//         builder.addMethod(MethodSpec.overriding(method)
//                 .addStatement("return observableCache." + cacheMethod() + "(" + keyName + ")")
//                 .build());
//     }
// 
//     String returnedType();
// 
//     String cacheMethod();
// }


// Path: observable-cache-service-processor-api/src/main/java/com/github/aleksandermielczarek/observablecache/service/processor/api/method/extend/FromCacheMethod.java
import com.github.aleksandermielczarek.observablecache.service.processor.api.method.base.BaseMethod;
import com.squareup.javapoet.MethodSpec;
import com.squareup.javapoet.TypeSpec;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;
import javax.lang.model.element.ElementKind;
import javax.lang.model.element.ExecutableElement;
import javax.lang.model.element.TypeElement;

package com.github.aleksandermielczarek.observablecache.service.processor.api.method.extend;




/**
 * Created by Aleksander Mielczarek on 06.11.2016.
 */

public interface FromCacheMethod extends ExtendMethod {

    @Override
    default boolean isExtendMethod(ExecutableElement baseMethodElement, BaseMethod baseMethod, ExecutableElement extendMethod, ProcessingEnvironment processingEnvironment) {