jodd-madvoc/src/main/java/jodd/madvoc/config/Targets.java
@SuppressWarnings({"unchecked", "NullArgumentToVariableArgMethod"})
	protected Object createActionMethodArgument(final Class type, final Object action) {
		try {
			if (type.getEnclosingClass() == null || Modifier.isStatic(type.getModifiers())) {
				// regular or static class
				return ClassUtil.newInstance(type);
			} else {
				// member class
				Constructor ctor = type.getDeclaredConstructor(type.getDeclaringClass());
				ctor.setAccessible(true);
				return ctor.newInstance(action);
			}
		} catch (Exception ex) {
			throw new MadvocException(ex);
		}
	}
@SuppressWarnings({"unchecked", "NullArgumentToVariableArgMethod"})
	protected Object createActionMethodArgument(final Class type, final Object action) {
		try {
			if (type.getEnclosingClass() == null || Modifier.isStatic(type.getModifiers())) {
				// regular or static class
				return ClassUtil.newInstance(type);
			} else {
				// member class
				Constructor ctor = type.getDeclaredConstructor(type.getDeclaringClass());
				ctor.setAccessible(true);
				return ctor.newInstance(action);
			}
		} catch (Exception ex) {
			throw new MadvocException(ex);
		}
	}
@ SuppressWarnings ( { "unchecked" , "NullArgumentToVariableArgMethod" } ) protected Object createActionMethodArgument ( final Class type , final Object action ) { try { if ( type . getEnclosingClass ( ) == null || Modifier . isStatic ( type . getModifiers ( ) ) ) { // regular or static class return ClassUtil . newInstance ( type ) ; } else { // member class Constructor ctor = type . getDeclaredConstructor ( type . getDeclaringClass ( ) ) ; ctor . setAccessible ( true ) ; return ctor . newInstance ( action ) ; } } catch ( Exception ex ) { throw new MadvocException ( ex ) ; } }
Creates action method arguments.
Creates action method arguments .