Search in sources :

Example 1 with JPrimitiveType

use of com.helger.jcodemodel.JPrimitiveType in project androidannotations by androidannotations.

the class PageChangeHolder method createPageScroll.

private void createPageScroll() {
    JMethod method = listenerClass.method(JMod.PUBLIC, holder.getCodeModel().VOID, "onPageScrolled");
    method.annotate(Override.class);
    pageScrolledBody = method.body();
    JPrimitiveType intClass = holder.getCodeModel().INT;
    pageScrolledPositionParam = method.param(intClass, "position");
    pageScrolledPositionOffsetParam = method.param(holder.getCodeModel().FLOAT, "positionOffset");
    pageScrolledPositionOffsetPixelsParam = method.param(intClass, "positionOffsetPixels");
}
Also used : JPrimitiveType(com.helger.jcodemodel.JPrimitiveType) JMethod(com.helger.jcodemodel.JMethod)

Example 2 with JPrimitiveType

use of com.helger.jcodemodel.JPrimitiveType in project androidannotations by androidannotations.

the class PageChangeHolder method createPageSelected.

private void createPageSelected() {
    JMethod method = listenerClass.method(JMod.PUBLIC, holder.getCodeModel().VOID, "onPageSelected");
    method.annotate(Override.class);
    pageSelectedBody = method.body();
    JPrimitiveType intClass = holder.getCodeModel().INT;
    pageSelectedPositionParam = method.param(intClass, "position");
}
Also used : JPrimitiveType(com.helger.jcodemodel.JPrimitiveType) JMethod(com.helger.jcodemodel.JMethod)

Example 3 with JPrimitiveType

use of com.helger.jcodemodel.JPrimitiveType in project androidannotations by androidannotations.

the class TextWatcherHolder method createBeforeTextChanged.

private void createBeforeTextChanged() {
    JPrimitiveType intClass = holder.getCodeModel().INT;
    JMethod beforeTextChangedMethod = listenerClass.method(JMod.PUBLIC, holder.getCodeModel().VOID, "beforeTextChanged");
    beforeTextChangedMethod.annotate(Override.class);
    beforeTextChangedBody = beforeTextChangedMethod.body();
    beforeTextChangedCharSequenceParam = beforeTextChangedMethod.param(holder.getClasses().CHAR_SEQUENCE, "s");
    beforeTextChangedStartParam = beforeTextChangedMethod.param(intClass, "start");
    beforeTextChangedCountParam = beforeTextChangedMethod.param(intClass, "count");
    beforeTextChangedAfterParam = beforeTextChangedMethod.param(intClass, "after");
}
Also used : JPrimitiveType(com.helger.jcodemodel.JPrimitiveType) JMethod(com.helger.jcodemodel.JMethod)

Example 4 with JPrimitiveType

use of com.helger.jcodemodel.JPrimitiveType in project androidannotations by androidannotations.

the class TextWatcherHolder method createOnTextChanged.

private void createOnTextChanged() {
    JPrimitiveType intClass = holder.getCodeModel().INT;
    JMethod onTextChangedMethod = listenerClass.method(JMod.PUBLIC, holder.getCodeModel().VOID, "onTextChanged");
    onTextChangedMethod.annotate(Override.class);
    onTextChangedBody = onTextChangedMethod.body();
    onTextChangedCharSequenceParam = onTextChangedMethod.param(holder.getClasses().CHAR_SEQUENCE, "s");
    onTextChangedStartParam = onTextChangedMethod.param(intClass, "start");
    onTextChangedBeforeParam = onTextChangedMethod.param(intClass, "before");
    onTextChangedCountParam = onTextChangedMethod.param(intClass, "count");
}
Also used : JPrimitiveType(com.helger.jcodemodel.JPrimitiveType) JMethod(com.helger.jcodemodel.JMethod)

Example 5 with JPrimitiveType

use of com.helger.jcodemodel.JPrimitiveType in project androidannotations by androidannotations.

the class PageChangeHolder method createPageScrollStateChanged.

private void createPageScrollStateChanged() {
    JMethod method = listenerClass.method(JMod.PUBLIC, holder.getCodeModel().VOID, "onPageScrollStateChanged");
    method.annotate(Override.class);
    pageScrollStateChangedBody = method.body();
    JPrimitiveType intClass = holder.getCodeModel().INT;
    pageScrollStateChangedStateParam = method.param(intClass, "state");
}
Also used : JPrimitiveType(com.helger.jcodemodel.JPrimitiveType) JMethod(com.helger.jcodemodel.JMethod)

Aggregations

JMethod (com.helger.jcodemodel.JMethod)5 JPrimitiveType (com.helger.jcodemodel.JPrimitiveType)5