Search in sources :

Example 1 with IntentFilterData

use of org.androidannotations.holder.ReceiverRegistrationDelegate.IntentFilterData in project androidannotations by androidannotations.

the class ReceiverHandler method process.

@Override
public void process(Element element, HasReceiverRegistration holder) throws Exception {
    String methodName = element.getSimpleName().toString();
    String receiverName = methodName + "Receiver" + generationSuffix();
    Receiver annotation = element.getAnnotation(Receiver.class);
    String[] actions = annotation.actions();
    String[] dataSchemes = annotation.dataSchemes();
    Receiver.RegisterAt registerAt = annotation.registerAt();
    boolean local = annotation.local();
    JFieldVar intentFilterField = holder.getIntentFilterField(new IntentFilterData(actions, dataSchemes, registerAt));
    JFieldVar receiverField = createReceiverField(holder, receiverName, methodName, (ExecutableElement) element);
    registerAndUnregisterReceiver(holder, registerAt, intentFilterField, receiverField, local);
}
Also used : IntentFilterData(org.androidannotations.holder.ReceiverRegistrationDelegate.IntentFilterData) JFieldVar(com.helger.jcodemodel.JFieldVar) Receiver(org.androidannotations.annotations.Receiver)

Aggregations

JFieldVar (com.helger.jcodemodel.JFieldVar)1 Receiver (org.androidannotations.annotations.Receiver)1 IntentFilterData (org.androidannotations.holder.ReceiverRegistrationDelegate.IntentFilterData)1