Search in sources :

Example 31 with JDefinedClass

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

the class EComponentWithViewSupportHolder method createOnSeekBarChangeListenerHolder.

private OnSeekBarChangeListenerHolder createOnSeekBarChangeListenerHolder(JFieldRef idRef) {
    JDefinedClass onSeekbarChangeListenerClass = getCodeModel().anonymousClass(getClasses().ON_SEEKBAR_CHANGE_LISTENER);
    AbstractJClass viewClass = getClasses().SEEKBAR;
    FoundViewHolder foundViewHolder = getFoundViewHolder(idRef, viewClass);
    foundViewHolder.getIfNotNullBlock().invoke(foundViewHolder.getRef(), "setOnSeekBarChangeListener").arg(_new(onSeekbarChangeListenerClass));
    return new OnSeekBarChangeListenerHolder(this, onSeekbarChangeListenerClass);
}
Also used : JDefinedClass(com.helger.jcodemodel.JDefinedClass) AbstractJClass(com.helger.jcodemodel.AbstractJClass)

Aggregations

JDefinedClass (com.helger.jcodemodel.JDefinedClass)31 JMethod (com.helger.jcodemodel.JMethod)20 AbstractJClass (com.helger.jcodemodel.AbstractJClass)19 JBlock (com.helger.jcodemodel.JBlock)15 JVar (com.helger.jcodemodel.JVar)15 JInvocation (com.helger.jcodemodel.JInvocation)9 IJExpression (com.helger.jcodemodel.IJExpression)5 JClassAlreadyExistsException (com.helger.jcodemodel.JClassAlreadyExistsException)5 JFieldVar (com.helger.jcodemodel.JFieldVar)5 JTypeVar (com.helger.jcodemodel.JTypeVar)5 VisitorDefinition (com.github.sviperll.adt4j.model.config.VisitorDefinition)4 GenerationProcess (com.github.sviperll.adt4j.model.util.GenerationProcess)3 JAnnotationUse (com.helger.jcodemodel.JAnnotationUse)3 JConditional (com.helger.jcodemodel.JConditional)3 JFieldRef (com.helger.jcodemodel.JFieldRef)3 ExecutableElement (javax.lang.model.element.ExecutableElement)3 TypeMirror (javax.lang.model.type.TypeMirror)3 VariableDeclaration (com.github.sviperll.adt4j.model.config.VariableDeclaration)2 MethodUsage (com.github.sviperll.adt4j.model.config.VisitorDefinition.MethodUsage)2 JCatchBlock (com.helger.jcodemodel.JCatchBlock)2