public Object get(int index) { return FastArray.this.get(index); }
return null; } else if (methodCount == 1) { Object method = methods.get(0); if (((ParameterTypes) method).isValidMethod(arguments)) { return method;
private void appendMethods(StringBuilder buffer) { for (int i = 0; i < methods.size; i++) { buffer.append("\n "); Object methodOrConstructor = methods.get(i); if (methodOrConstructor instanceof MetaMethod) { MetaMethod method = (MetaMethod) methodOrConstructor; buffer.append(Modifier.toString(method.getModifiers())); buffer.append(" ").append(method.getReturnType().getName()); buffer.append(" ").append(method.getDeclaringClass().getName()); buffer.append("#"); buffer.append(method.getName()); appendClassNames(buffer,method.getNativeParameterTypes()); } else { CachedConstructor method = (CachedConstructor) methodOrConstructor; buffer.append(Modifier.toString(method.cachedConstructor.getModifiers())); buffer.append(" ").append(method.cachedConstructor.getDeclaringClass().getName()); buffer.append("#<init>"); appendClassNames(buffer,method.getNativeParameterTypes()); } } } }
return null; } else if (methodCount == 1) { Object method = methods.get(0); if (((ParameterTypes) method).isValidMethod(arguments)) { return method;
private void addSubclassExpandos(List<MetaMethod> arr, MetaClass mc) { if (mc instanceof ExpandoMetaClass) { ExpandoMetaClass emc = (ExpandoMetaClass) mc; for (Object mm : emc.getExpandoSubclassMethods()) { if (mm instanceof MetaMethod) { MetaMethod method = (MetaMethod) mm; if (method.getDeclaringClass() == this) arr.add(method); } else { FastArray farr = (FastArray) mm; for (int i = 0; i != farr.size; ++i) { MetaMethod method = (MetaMethod) farr.get(i); if (method.getDeclaringClass() == this) arr.add(method); } } } } }
private static MetaMethod findSubClassMethod(Class instanceKlazz, String methodName, Class[] arguments, MetaClass metaClass, MetaMethod method) { if (metaClass instanceof MetaClassImpl) { Object list = ((MetaClassImpl) metaClass).getSubclassMetaMethods(methodName); if (list != null) { if (list instanceof MetaMethod) { MetaMethod m = (MetaMethod) list; method = findSubClassMethod(instanceKlazz, arguments, method, m); } else { FastArray arr = (FastArray) list; for (int i = 0; i != arr.size(); ++i) { MetaMethod m = (MetaMethod) arr.get(i); method = findSubClassMethod(instanceKlazz, arguments, method, m); } } } } return method; }
private void assignMethodChooser() { if (closureMethods.size() == 1) { final MetaMethod doCall = (MetaMethod) closureMethods.get(0); final CachedClass[] c = doCall.getParameterTypes(); int length = c.length; MetaMethod m0 = null, m1 = null; for (int i = 0; i != closureMethods.size(); ++i) { MetaMethod m = (MetaMethod) closureMethods.get(i); CachedClass[] c = m.getParameterTypes(); if (c.length == 0) {
list.add(method); } else { MetaMethod match = (MetaMethod) list.get(found); if (match==method) return o; if (match.isPrivate()
public Object get(int index) { return FastArray.this.get(index); }
public Object get(int index) { return FastArray.this.get(index); }
public Object get(int index) { return FastArray.this.get(index); }
private void appendMethods(StringBuffer buffer) { for (int i = 0; i < methods.size; i++) { buffer.append("\n "); Object methodOrConstructor = methods.get(i); if (methodOrConstructor instanceof MetaMethod) { MetaMethod method = (MetaMethod) methodOrConstructor; buffer.append(Modifier.toString(method.getModifiers())); buffer.append(" ").append(method.getReturnType().getName()); buffer.append(" ").append(method.getDeclaringClass().getName()); buffer.append("#"); buffer.append(method.getName()); appendClassNames(buffer,method.getNativeParameterTypes()); } else { CachedConstructor method = (CachedConstructor) methodOrConstructor; buffer.append(Modifier.toString(method.cachedConstructor.getModifiers())); buffer.append(" ").append(method.cachedConstructor.getDeclaringClass().getName()); buffer.append("#<init>"); appendClassNames(buffer,method.getNativeParameterTypes()); } } } }
private void appendMethods(StringBuffer buffer) { for (int i = 0; i < methods.size; i++) { buffer.append("\n "); Object methodOrConstructor = methods.get(i); if (methodOrConstructor instanceof MetaMethod) { MetaMethod method = (MetaMethod) methodOrConstructor; buffer.append(Modifier.toString(method.getModifiers())); buffer.append(" ").append(method.getReturnType().getName()); buffer.append(" ").append(method.getDeclaringClass().getName()); buffer.append("#"); buffer.append(method.getName()); appendClassNames(buffer,method.getNativeParameterTypes()); } else { CachedConstructor method = (CachedConstructor) methodOrConstructor; buffer.append(Modifier.toString(method.cachedConstructor.getModifiers())); buffer.append(" ").append(method.cachedConstructor.getDeclaringClass().getName()); buffer.append("#<init>"); appendClassNames(buffer,method.getNativeParameterTypes()); } } } }
private void addSubclassExpandos(ArrayList<MetaMethod> arr, MetaClass mc) { if (mc != null && mc instanceof ExpandoMetaClass) { ExpandoMetaClass emc = (ExpandoMetaClass) mc; for (Object mm : emc.getExpandoSubclassMethods()) { if (mm instanceof MetaMethod) { MetaMethod method = (MetaMethod) mm; if (method.getDeclaringClass() == this) arr.add(method); } else { FastArray farr = (FastArray) mm; for (int i = 0; i != farr.size; ++i) { MetaMethod method = (MetaMethod) farr.get(i); if (method.getDeclaringClass() == this) arr.add(method); } } } } }
private void addSubclassExpandos(ArrayList<MetaMethod> arr, MetaClass mc) { if (mc != null && mc instanceof ExpandoMetaClass) { ExpandoMetaClass emc = (ExpandoMetaClass) mc; for (Object mm : emc.getExpandoSubclassMethods()) { if (mm instanceof MetaMethod) { MetaMethod method = (MetaMethod) mm; if (method.getDeclaringClass() == this) arr.add(method); } else { FastArray farr = (FastArray) mm; for (int i = 0; i != farr.size; ++i) { MetaMethod method = (MetaMethod) farr.get(i); if (method.getDeclaringClass() == this) arr.add(method); } } } } }
private void appendMethods(StringBuffer buffer) { for (int i = 0; i < methods.size; i++) { buffer.append("\n "); Object methodOrConstructor = methods.get(i); if (methodOrConstructor instanceof MetaMethod) { MetaMethod method = (MetaMethod) methodOrConstructor; buffer.append(Modifier.toString(method.getModifiers())); buffer.append(" ").append(method.getReturnType().getName()); buffer.append(" ").append(method.getDeclaringClass().getName()); buffer.append("#"); buffer.append(method.getName()); appendClassNames(buffer,method.getNativeParameterTypes()); } else { CachedConstructor method = (CachedConstructor) methodOrConstructor; buffer.append(Modifier.toString(method.cachedConstructor.getModifiers())); buffer.append(" ").append(method.cachedConstructor.getDeclaringClass().getName()); buffer.append("#<init>"); appendClassNames(buffer,method.getNativeParameterTypes()); } } } }
private void addSubclassExpandos(List<MetaMethod> arr, MetaClass mc) { if (mc != null && mc instanceof ExpandoMetaClass) { ExpandoMetaClass emc = (ExpandoMetaClass) mc; for (Object mm : emc.getExpandoSubclassMethods()) { if (mm instanceof MetaMethod) { MetaMethod method = (MetaMethod) mm; if (method.getDeclaringClass() == this) arr.add(method); } else { FastArray farr = (FastArray) mm; for (int i = 0; i != farr.size; ++i) { MetaMethod method = (MetaMethod) farr.get(i); if (method.getDeclaringClass() == this) arr.add(method); } } } } }
FastArray arr = (FastArray) list; for (int i = 0; i != arr.size(); ++i) { MetaMethod m = (MetaMethod) arr.get(i); if (m.getDeclaringClass().getTheClass().isAssignableFrom(instanceKlazz)) { if (m.isValidExactMethod(arguments)) {
FastArray arr = (FastArray) list; for (int i = 0; i != arr.size(); ++i) { MetaMethod m = (MetaMethod) arr.get(i); if (m.getDeclaringClass().getTheClass().isAssignableFrom(instanceKlazz)) { if (m.isValidExactMethod(arguments)) {
FastArray arr = (FastArray) list; for (int i = 0; i != arr.size(); ++i) { MetaMethod m = (MetaMethod) arr.get(i); if (m.getDeclaringClass().getTheClass().isAssignableFrom(instanceKlazz)) { if (m.isValidExactMethod(arguments)) {