public MethodBeanCreator(Method method, String[] parameterNames, Type[] expandedParameterTypes, Class<?> concreteClass) { super(method.getReturnType(), method.getDeclaringClass(), concreteClass, parameterNames, expandedParameterTypes, method.getParameterAnnotations()); if (!Modifier.isStatic(method.getModifiers())) throw new IllegalStateException("Only static methods can be used as creators!"); this._creator = method; if (!_creator.isAccessible()) { _creator.setAccessible(true); } decorate(_creator); }
public MethodBeanCreator(Method method, String[] parameterNames, Type[] expandedParameterTypes, Class<?> concreteClass) { super(method.getReturnType(), method.getDeclaringClass(), concreteClass, parameterNames, expandedParameterTypes, method.getParameterAnnotations()); if (!Modifier.isStatic(method.getModifiers())) throw new IllegalStateException("Only static methods can be used as creators!"); this._creator = method; if (!_creator.isAccessible()) { _creator.setAccessible(true); } decorate(_creator); }