public java.lang.Class getClass(java.lang.String name, java.lang.Class defaultValue) { java.lang.String className = null; if (defaultValue == null) { className = this.getString(name, name); } else { className = this.getString(name, defaultValue.getName()); } java.lang.Class retClass = null; try { retClass = Class.forName(className); } catch (java.lang.ClassNotFoundException e) { retClass = defaultValue; } return retClass; }
private static <T> T __check_arg__(java.lang.Class<T> expectedClass, Object argument) { T result = null; if (java.lang.Integer.class.equals(expectedClass) && argument instanceof Double) { result = (T) new java.lang.Integer(((Double) argument).intValue()); } else if (java.lang.Float.class.equals(expectedClass) && argument instanceof Double) { result = (T) new java.lang.Float(((Double) argument).floatValue()); } else { try { result = expectedClass.cast(argument); } catch (Throwable ex) { throw new IllegalArgumentException( String.format( "Bad parameter type in call to %s. Found '%s' when expected '%s'.", "nbActions", argument.getClass().getName(), expectedClass.getName())); } } return result; }