FastConstructor(FastClass fc, Constructor constructor) { super(fc, constructor, fc.getIndex(constructor.getParameterTypes())); }
FastConstructor(FastClass fc, Constructor constructor) { super(fc, constructor, fc.getIndex(constructor.getParameterTypes())); }
public Object newInstance() throws InvocationTargetException { return newInstance(getIndex(Constants.EMPTY_CLASS_ARRAY), null); }
public Object newInstance(Class[] parameterTypes, Object[] args) throws InvocationTargetException { return newInstance(getIndex(parameterTypes), args); }
public Object invoke(String name, Class[] parameterTypes, Object obj, Object[] args) throws InvocationTargetException { return invoke(getIndex(name, parameterTypes), obj, args); }
private static int helper(FastClass fc, Method method) { int index = fc.getIndex(new Signature(method.getName(), Type.getMethodDescriptor(method))); if (index < 0) { Class[] types = method.getParameterTypes(); System.err.println("hash=" + method.getName().hashCode() + " size=" + types.length); for (int i = 0; i < types.length; i++) { System.err.println(" types[" + i + "]=" + types[i].getName()); } throw new IllegalArgumentException("Cannot find method " + method); } return index; }
public Object invoke(String name, Class[] parameterTypes, Object obj, Object[] args) throws InvocationTargetException { return invoke(getIndex(name, parameterTypes), obj, args); }
private static int helper(FastClass fc, Method method) { int index = fc.getIndex(new Signature(method.getName(), Type.getMethodDescriptor(method))); if (index < 0) { Class[] types = method.getParameterTypes(); System.err.println("hash=" + method.getName().hashCode() + " size=" + types.length); for (int i = 0; i < types.length; i++) { System.err.println(" types[" + i + "]=" + types[i].getName()); } throw new IllegalArgumentException("Cannot find method " + method); } return index; }
public Object newInstance() throws InvocationTargetException { return newInstance(getIndex(Constants.EMPTY_CLASS_ARRAY), null); }
public Object newInstance(Class[] parameterTypes, Object[] args) throws InvocationTargetException { return newInstance(getIndex(parameterTypes), args); }
private void init() { /* * Using a volatile invariant allows us to initialize the FastClass and * method index pairs atomically. * * Double-checked locking is safe with volatile in Java 5. Before 1.5 this * code could allow fastClassInfo to be instantiated more than once, which * appears to be benign. */ if (fastClassInfo == null) { synchronized (initLock) { if (fastClassInfo == null) { CreateInfo ci = createInfo; FastClassInfo fci = new FastClassInfo(); fci.f1 = helper(ci, ci.c1); fci.f2 = helper(ci, ci.c2); fci.i1 = fci.f1.getIndex(sig1); fci.i2 = fci.f2.getIndex(sig2); fastClassInfo = fci; createInfo = null; } } } }
private void init() { /* * Using a volatile invariant allows us to initialize the FastClass and * method index pairs atomically. * * Double-checked locking is safe with volatile in Java 5. Before 1.5 this * code could allow fastClassInfo to be instantiated more than once, which * appears to be benign. */ if (fastClassInfo == null) { synchronized (initLock) { if (fastClassInfo == null) { CreateInfo ci = createInfo; FastClassInfo fci = new FastClassInfo(); fci.f1 = helper(ci, ci.c1); fci.f2 = helper(ci, ci.c2); fci.i1 = fci.f1.getIndex(sig1); fci.i2 = fci.f2.getIndex(sig2); fastClassInfo = fci; createInfo = null; } } } }
int methodIndex = serviceFastClass.getIndex(methodName, parameterTypes); return serviceFastClass.invoke(methodIndex, serviceBean, parameters);
FastConstructor(FastClass fc, Constructor constructor) { super(fc, constructor, fc.getIndex(constructor.getParameterTypes())); }
private static int helper(FastClass fc, Method method) { int index = fc.getIndex(method.getName(), method.getParameterTypes()); if (index < 0) { Class[] types = method.getParameterTypes(); System.err.println("hash=" + method.getName().hashCode() + " size=" + types.length); for (int i = 0; i < types.length; i++) { System.err.println(" types[" + i + "]=" + types[i].getName()); } throw new IllegalArgumentException("Cannot find method " + method); } return index; }
private static int helper(FastClass fc, Method method) { int index = fc.getIndex(method.getName(), method.getParameterTypes()); if (index < 0) { Class[] types = method.getParameterTypes(); System.err.println("hash=" + method.getName().hashCode() + " size=" + types.length); for (int i = 0; i < types.length; i++) { System.err.println(" types[" + i + "]=" + types[i].getName()); } throw new IllegalArgumentException("Cannot find method " + method); } return index; }
private static int helper(FastClass fc, Method method) { int index = fc.getIndex(method.getName(), method.getParameterTypes()); if (index < 0) { Class[] types = method.getParameterTypes(); System.err.println("hash=" + method.getName().hashCode() + " size=" + types.length); for (int i = 0; i < types.length; i++) { System.err.println(" types[" + i + "]=" + types[i].getName()); } throw new IllegalArgumentException("Cannot find method " + method); } return index; }
public Object newInstance(Class[] parameterTypes, Object[] args) throws InvocationTargetException { return newInstance(getIndex(parameterTypes), args); }
public Object invoke(String name, Class[] parameterTypes, Object obj, Object[] args) throws InvocationTargetException { return invoke(getIndex(name, parameterTypes), obj, args); }
public Object newInstance() throws InvocationTargetException { return newInstance(getIndex(Constants.EMPTY_CLASS_ARRAY), null); }