public Method[] clone(Method[] m) { if (m.length == 0) { return m; } Method[] result = new Method[m.length]; for (int i = 0; i < result.length; i++) { result[i] = new Method(m[i]); } return result; }
public Method clone(Method m) { return new Method(m); }
call(new Method() { public void run() { // do your stuff here } });
Method m = new GetMethod("http://some-site/some/path"); m.getParams().setVirtualHost("some-other-site"); client.executeMethod(m);
public Method[] clone(Method[] m) { if (m.length == 0) { return m; } Method[] result = new Method[m.length]; for (int i = 0; i < result.length; i++) { result[i] = new Method(m[i]); } return result; }
public Method[] clone(Method[] m) { if (m.length == 0) { return m; } Method[] result = new Method[m.length]; for (int i = 0; i < result.length; i++) { result[i] = new Method(m[i]); } return result; }
public Method[] clone(Method[] m) { if (m.length == 0) { return m; } Method[] result = new Method[m.length]; for (int i = 0; i < result.length; i++) { result[i] = new Method(m[i]); } return result; }
public Method[] clone(Method[] m) { if (m.length == 0) { return m; } Method[] result = new Method[m.length]; for (int i = 0; i < result.length; i++) { result[i] = new Method(m[i]); } return result; }
public Method[] clone(Method[] m) { if (m.length == 0) { return m; } Method[] result = new Method[m.length]; for (int i = 0; i < result.length; i++) { result[i] = new Method(m[i]); } return result; }
public Method[] clone(Method[] m) { if (m.length == 0) { return m; } Method[] result = new Method[m.length]; for (int i = 0; i < result.length; i++) { result[i] = new Method(m[i]); } return result; }
public Method clone(Method m) { return new Method(m); }
public Method clone(Method m) { return new Method(m); }
scala> val m = new Method().param(1).param("test") m: Method = Method@1130ad00 scala> m.l res8: shapeless.HList = test :: 1 :: HNil
public Method clone(Method m) { return new Method(m); }
public Method clone(Method m) { return new Method(m); }
public Method clone(Method m) { return new Method(m); }
private void addMethods(String[] signatures, int modifier) { for (int i= 0; i < signatures.length; i++) { String signature= signatures[i]; if (signature.startsWith("$$init_") || signature.startsWith("$$clinit_") /*|| signature.indexOf("_") == -1*/) continue; declaredMethods.add(new Method(this, signatures[i], modifier)); } }
@MethodAlias(local_alias= "getMethodBySignature") public Method getMethodBySignature(String signature) { Method[] foundMethods= getMethods(); for (Method method : foundMethods) { if (method.getName().equals(signature)) return method; } return new Method(this, signature, Modifier.PUBLIC); }
public static Object invoke(Proxy object, String methodSignature, Object[] args) throws Throwable { if (methodSignature.startsWith("getClass()")) return Proxy.class; else { Method method= new Method(null, methodSignature, Modifier.PUBLIC); return object.handler.invoke(object, method, args); } }
Method actual = new Method(environment(), methodExecutableElement); Method expected = new Method(..); assertEquals(expected, actual);