Code example for Method

Methods: isAnnotationPresent

0
    private final Object[] setterArgs;
    private final Method setter;
 
    LValueFunction(int position, Method getter, Method setter, RValue... args) {
        super(position, getter, args);
        assert (getter.isAnnotationPresent(Dynamic.class));
 
        setterArgs = new Object[args.length + 1];
        System.arraycopy(args, 0, setterArgs, 0, args.length);
        this.setter = setter;
    } 
 
    @Override 
    public char id() { 
        return 'l'; 
    } 
 
    @Override 
    public double assign(double value) throws EvaluationException {
        setterArgs[setterArgs.length - 1] = value;
        return invokeMethod(setter, setterArgs);