/** * Construct a new mock Method instance. * * @param clazz the class declaring the field * @param name the name of the field * @param args a read only array containing the types of each parameter in parameter order * @param returnType the return value type * @param flags the method attributes * @return a mock method */ public static MethodInfo create(ClassInfo clazz, String name, Type[] args, Type returnType, short flags) { return create(clazz, name, args, returnType, flags, null, null); }
/** * Construct a new mock Method instance. * * @param clazz the class declaring the field * @param name the name of the field * @param args a read only array containing the types of each parameter in parameter order * @param returnType the return value type * @param flags the method attributes * @param typeParameters the generic type parameters for this method * @param exceptions the exceptions declared as thrown by this method * @return a mock method * * @since 2.1 */ public static MethodInfo create(ClassInfo clazz, String name, Type[] args, Type returnType, short flags, TypeVariable[] typeParameters, Type[] exceptions) { return create(clazz, name, EMPTY_PARAMETER_NAMES, args, returnType, flags, typeParameters, exceptions); }
private static MethodInfo getMethodInfo(ClassInfo classInfo, Method method) { Class returnTypeClass = method.getReturnType(); short access_flags = (short) method.getModifiers(); return MethodInfo.create( classInfo, method.getName(), getTypes( method.getParameterTypes() ), getType( returnTypeClass ), access_flags ); }
private static MethodInfo getMethodInfo(ClassInfo classInfo, Method method) { Class returnTypeClass = method.getReturnType(); short access_flags = (short) method.getModifiers(); return MethodInfo.create( classInfo, method.getName(), getTypes( method.getParameterTypes() ), getType( returnTypeClass ), access_flags ); }