Search in sources :

Example 1 with OnActivityResult

use of org.androidannotations.annotations.OnActivityResult in project androidannotations by androidannotations.

the class OnActivityResultHandler method validate.

@Override
public void validate(Element element, ElementValidation validation) {
    validatorHelper.enclosingElementHasEActivityOrEFragment(element, validation);
    validatorHelper.isNotPrivate(element, validation);
    validatorHelper.doesntThrowException(element, validation);
    OnActivityResult onResultAnnotation = element.getAnnotation(OnActivityResult.class);
    validatorHelper.annotationValuePositiveAndInAShort(onResultAnnotation.value(), validation);
    ExecutableElement executableElement = (ExecutableElement) element;
    validatorHelper.returnTypeIsVoid(executableElement, validation);
    // 
    validatorHelper.param.anyOrder().type(CanonicalNameConstants.INTENT).optional().primitiveOrWrapper(TypeKind.INT).optional().annotatedWith(OnActivityResult.Extra.class).multiple().optional().validate((ExecutableElement) element, // 
    validation);
}
Also used : HasOnActivityResult(org.androidannotations.holder.HasOnActivityResult) OnActivityResult(org.androidannotations.annotations.OnActivityResult) ExecutableElement(javax.lang.model.element.ExecutableElement)

Aggregations

ExecutableElement (javax.lang.model.element.ExecutableElement)1 OnActivityResult (org.androidannotations.annotations.OnActivityResult)1 HasOnActivityResult (org.androidannotations.holder.HasOnActivityResult)1