All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.epam.jdi.light.elements.init.rules.AnnotationRule Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
package com.epam.jdi.light.elements.init.rules;

import com.epam.jdi.light.elements.base.JDIBase;
import com.epam.jdi.tools.func.JAction2;
import com.epam.jdi.tools.func.JAction3;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

/**
 * Created by Roman Iovlev on 26.09.2019
 * Email: [email protected]; Skype: roman.iovlev
 */
public class AnnotationRule {
    public Class annotation;
    public JAction3 action;
    public AnnotationRule(Class annotation, JAction2 action) {
        this.annotation = annotation;
        this.action = (b,a,i) -> action.execute(b,a);
    }
    public AnnotationRule(Class annotation, JAction3 action) {
        this.annotation = annotation;
        this.action = action;
    }
    public static  AnnotationRule aRule(Class cl, JAction2 action) {
        return new AnnotationRule<>(cl, action);
    }
    public static  AnnotationRule aRule(Class cl, JAction3 action) {
        return new AnnotationRule<>(cl, action);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy