use of com.helger.jcodemodel.IJExpression in project androidannotations by androidannotations.
the class AbstractListenerHandler method castArgumentIfNecessary.
protected final IJExpression castArgumentIfNecessary(T holder, String baseType, JVar param, Element element) {
IJExpression argument = param;
TypeMirror typeMirror = element.asType();
if (!baseType.equals(typeMirror.toString())) {
AbstractJClass typeMirrorToJClass = codeModelHelper.typeMirrorToJClass(typeMirror);
argument = JExpr.cast(typeMirrorToJClass, param);
}
return argument;
}
Aggregations