@Override public Value<String> copy() { return new InvocationValueImpl(this); }
/** * Returns a new {@link InvocationValue} representing a call to the * specified local method with the specified arguments. * * @param method the local method to invoke * @param args the arguments to pass to it * @return the created invocation */ static InvocationValue ofInvocation(String method, Value<?>... args) { final InvocationValue result = new InvocationValueImpl() .setValue(method); Stream.of(args).forEachOrdered(result::add); return result; }
/** * Returns a new {@link InvocationValue} representing a call to the * specified static method in the specified class with the specified * arguments. * * @param owner the class where the static method is located * @param method the static method to invoke * @param args the arguments to pass to it * @return the created invocation */ static InvocationValue ofInvocation(Type owner, String method, Value<?>... args) { final InvocationValue result = new InvocationValueImpl() .set(owner) .setValue(method); Stream.of(args).forEachOrdered(result::add); return result; } }
@Override public Value<String> copy() { return new InvocationValueImpl(this); }
/** * Returns a new {@link InvocationValue} representing a call to the * specified local method with the specified arguments. * * @param method the local method to invoke * @param args the arguments to pass to it * @return the created invocation */ static InvocationValue ofInvocation(String method, Value<?>... args) { final InvocationValue result = new InvocationValueImpl() .setValue(method); Stream.of(args).forEachOrdered(result::add); return result; }
/** * Returns a new {@link InvocationValue} representing a call to the * specified static method in the specified class with the specified * arguments. * * @param owner the class where the static method is located * @param method the static method to invoke * @param args the arguments to pass to it * @return the created invocation */ static InvocationValue ofInvocation(Type owner, String method, Value<?>... args) { final InvocationValue result = new InvocationValueImpl() .set(owner) .setValue(method); Stream.of(args).forEachOrdered(result::add); return result; } }