public CachedClosureClass(Class klazz, ClassInfo classInfo) { super(klazz, classInfo); CachedMethod methods [] = getMethods(); // set it to -1 for starters so parameterTypes will always get a type int maximumNumberOfParameters = -1; Class[] parameterTypes = null; for (CachedMethod method : methods) { if ("doCall".equals(method.getName())) { final Class[] pt = method.getNativeParameterTypes(); if (pt.length > maximumNumberOfParameters) { parameterTypes = pt; maximumNumberOfParameters = parameterTypes.length; } } } // this line should be useless, but well, just in case maximumNumberOfParameters = Math.max(maximumNumberOfParameters,0); this.maximumNumberOfParameters = maximumNumberOfParameters; this.parameterTypes = parameterTypes; }
public Closure(Object owner, Object thisObject) { this.owner = owner; this.delegate = owner; this.thisObject = thisObject; final CachedClosureClass cachedClass = (CachedClosureClass) ReflectionCache.getCachedClass(getClass()); parameterTypes = cachedClass.getParameterTypes(); maximumNumberOfParameters = cachedClass.getMaximumNumberOfParameters(); }
cachedClass = new CharacterCachedClass(klazz, classInfo, true); } else if (Closure.class.isAssignableFrom(klazz)) { cachedClass = new CachedClosureClass (klazz, classInfo); } else if (isSAM(klazz)) { cachedClass = new CachedSAMClass(klazz, classInfo);
cachedClass = new CharacterCachedClass(klazz, true); } else if (Closure.class.isAssignableFrom(klazz)) { cachedClass = new CachedClosureClass (klazz); } else { cachedClass = new CachedClass(klazz);
public Closure(Object owner, Object thisObject) { this.owner = owner; this.delegate = owner; this.thisObject = thisObject; final CachedClosureClass cachedClass = (CachedClosureClass) ReflectionCache.getCachedClass(getClass()); parameterTypes = cachedClass.getParameterTypes(); maximumNumberOfParameters = cachedClass.getMaximumNumberOfParameters(); }
public CachedClosureClass(Class klazz) { super(klazz); CachedMethod methods [] = getMethods(); // set it to -1 for starters so parameterTypes will always get a type int _maximumNumberOfParameters = -1; Class[] _parameterTypes = null; for (int j = 0; j < methods.length; j++) { if ("doCall".equals(methods[j].getName())) { final Class[] pt = methods[j].getNativeParameterTypes(); if (pt.length > _maximumNumberOfParameters) { _parameterTypes = pt; _maximumNumberOfParameters = _parameterTypes.length; } } } // this line should be useless, but well, just in case _maximumNumberOfParameters = Math.max(_maximumNumberOfParameters,0); maximumNumberOfParameters = _maximumNumberOfParameters; parameterTypes = _parameterTypes; }
cachedClass = new CharacterCachedClass(klazz, classInfo, true); } else if (Closure.class.isAssignableFrom(klazz)) { cachedClass = new CachedClosureClass (klazz, classInfo); } else { cachedClass = new CachedClass(klazz, classInfo);
public Closure(Object owner, Object thisObject) { this.owner = owner; this.delegate = owner; this.thisObject = thisObject; final CachedClosureClass cachedClass = (CachedClosureClass) ReflectionCache.getCachedClass(getClass()); parameterTypes = cachedClass.getParameterTypes(); maximumNumberOfParameters = cachedClass.getMaximumNumberOfParameters(); }
public CachedClosureClass(Class klazz, ClassInfo classInfo) { super(klazz, classInfo); CachedMethod methods [] = getMethods(); // set it to -1 for starters so parameterTypes will always get a type int _maximumNumberOfParameters = -1; Class[] _parameterTypes = null; for (int j = 0; j < methods.length; j++) { if ("doCall".equals(methods[j].getName())) { final Class[] pt = methods[j].getNativeParameterTypes(); if (pt.length > _maximumNumberOfParameters) { _parameterTypes = pt; _maximumNumberOfParameters = _parameterTypes.length; } } } // this line should be useless, but well, just in case _maximumNumberOfParameters = Math.max(_maximumNumberOfParameters,0); maximumNumberOfParameters = _maximumNumberOfParameters; parameterTypes = _parameterTypes; }
cachedClass = new CharacterCachedClass(klazz, classInfo, true); } else if (Closure.class.isAssignableFrom(klazz)) { cachedClass = new CachedClosureClass (klazz, classInfo); } else { cachedClass = new CachedClass(klazz, classInfo);
public Closure(Object owner, Object thisObject) { this.owner = owner; this.delegate = owner; this.thisObject = thisObject; final CachedClosureClass cachedClass = (CachedClosureClass) ReflectionCache.getCachedClass(getClass()); parameterTypes = cachedClass.getParameterTypes(); maximumNumberOfParameters = cachedClass.getMaximumNumberOfParameters(); }
public CachedClosureClass(Class klazz, ClassInfo classInfo) { super(klazz, classInfo); CachedMethod methods [] = getMethods(); // set it to -1 for starters so parameterTypes will always get a type int maximumNumberOfParameters = -1; Class[] parameterTypes = null; for (CachedMethod method : methods) { if ("doCall".equals(method.getName())) { final Class[] pt = method.getNativeParameterTypes(); if (pt.length > maximumNumberOfParameters) { parameterTypes = pt; maximumNumberOfParameters = parameterTypes.length; } } } // this line should be useless, but well, just in case maximumNumberOfParameters = Math.max(maximumNumberOfParameters,0); this.maximumNumberOfParameters = maximumNumberOfParameters; this.parameterTypes = parameterTypes; }
cachedClass = new CharacterCachedClass(klazz, classInfo, true); } else if (Closure.class.isAssignableFrom(klazz)) { cachedClass = new CachedClosureClass (klazz, classInfo); } else { cachedClass = new CachedClass(klazz, classInfo);
public CachedClosureClass(Class klazz, ClassInfo classInfo) { super(klazz, classInfo); CachedMethod methods [] = getMethods(); // set it to -1 for starters so parameterTypes will always get a type int _maximumNumberOfParameters = -1; Class[] _parameterTypes = null; for (int j = 0; j < methods.length; j++) { if ("doCall".equals(methods[j].getName())) { final Class[] pt = methods[j].getNativeParameterTypes(); if (pt.length > _maximumNumberOfParameters) { _parameterTypes = pt; _maximumNumberOfParameters = _parameterTypes.length; } } } // this line should be useless, but well, just in case _maximumNumberOfParameters = Math.max(_maximumNumberOfParameters,0); maximumNumberOfParameters = _maximumNumberOfParameters; parameterTypes = _parameterTypes; }