Search in sources :

Example 1 with Watch

use of com.axellience.vuegwt.core.annotations.component.Watch in project vue-gwt by Axellience.

the class ComponentJsTypeGenerator method processWatchers.

/**
 * Process watchers from the Component Class.
 * @param component {@link VueComponent} to process
 * @param optionsBuilder A {@link MethodSpec.Builder} for the method that creates the
 * {@link VueComponentOptions}
 */
private void processWatchers(TypeElement component, MethodSpec.Builder optionsBuilder, Builder componentJsTypeBuilder) {
    getMethodsWithAnnotation(component, Watch.class).forEach(method -> {
        Watch watch = method.getAnnotation(Watch.class);
        optionsBuilder.addStatement("options.addJavaWatch($S, $S, $L)", method.getSimpleName().toString(), watch.value(), watch.isDeep());
        addProxyJsTypeMethodIfNecessary(componentJsTypeBuilder, method);
    });
}
Also used : Watch(com.axellience.vuegwt.core.annotations.component.Watch)

Aggregations

Watch (com.axellience.vuegwt.core.annotations.component.Watch)1