Helper method to create a visibility configuration.<p>

@param className the visibility handler class name
@param params the parameters for the visibility

@return the visibility configuration
345812
protected VisibilityConfiguration createVisibilityConfiguration(String className, String params) {

        I_CmsXmlContentVisibilityHandler handler = this;
        if (className != null) {
            try {
                handler = (I_CmsXmlContentVisibilityHandler)(Class.forName(className).newInstance());
            } catch (Exception e) {
                LOG.error(e.getLocalizedMessage(), e);
            }
        }
        VisibilityConfiguration result = new VisibilityConfiguration(handler, params);
        return result;
    }
867818
public static String evalUmlAppearanceOfVisibility(EVisibilityKind visibilityKind) {
    if(visibilityKind == EVisibilityKind.PACKAGE)
      return "";
    if(visibilityKind == EVisibilityKind.PRIVATE)
      return "-";
    if(visibilityKind == EVisibilityKind.PROTECTED)
      return "#";
    if(visibilityKind == EVisibilityKind.PUBLIC)
      return "+";
    throw new NullPointerException();
  }
361388
private static void validateParams(List<Object> params, Class<?> classz) {

        // skip validation if not uimafit
        if (!JCasAnnotator_ImplBase.class.isAssignableFrom(classz)
                && !JCasCollectionReader_ImplBase.class.isAssignableFrom(//
                        classz)) {
            LOG.warn(
                    "    +- Could not validate parameters in {}. You might want to check it manually.",
                    classz.getName());
            return;
        }

        for (int i = 0; i < params.size(); i = i + 2) {
            String paramName = (String) params.get(i);
            try {

                // add fields from superclass as well
                Set<Field> fields = newHashSet(classz.getDeclaredFields());
                fields.addAll(newHashSet(classz.getSuperclass()
                        .getDeclaredFields()));

                List<String> paramNames = new ArrayList<String>();
                for (Field f : fields) {
                    if (f.isAnnotationPresent(ConfigurationParameter.class)) {
                        ConfigurationParameter confParam = f
                                .getAnnotation(ConfigurationParameter.class);
                        paramNames.add(confParam.name());
                    }
                }

                if (!paramNames.contains(paramName)) {
                    LOG.warn(
                            "    +-XXXXXXXXX Could not find parameter '{}' in {}. You should check it.",
                            paramName, classz.getName());
                    LOG.warn("    +-XXXXXXXXX Available parameters are:\n",
                            join(paramNames, "\n"));
                }
            } catch (SecurityException e) {
                LOG.error(
                        "could not validate params for "
                                + classz.getSimpleName(), e);
            }
        }
    }
843149
def class_param_names(cls, hidden=True):
        
        param_names = set(
            k for (k, v) in cls.__dict__.items()
            if isinstance(v, Parameter)
        )
        for parent in cls.__bases__:
            if hasattr(parent, 'class_param_names'):
                param_names |= parent.class_param_names(hidden=hidden)

        if not hidden:
            param_names = set(n for n in param_names if not n.startswith('_'))
        return param_names
1310145
public static Class<?>[] toClassesFromObjects(final Object[] params) {
		final Class<?>[] classes = new Class<?>[params.length];
		int i = 0;
		for (final Object object : params) {
			if (object != null) {
				classes[i++] = object.getClass();
			} else {
				classes[i++] = Object.class;
			}
		}
		return classes;
	}
866489
@SuppressWarnings("unchecked")
	private Map<String, Object> buildParameters(Object parameters) {
		Map<String, Object> parameterMap = new HashMap<String, Object>();

		if (parameters != null) {
			if (parameters.getClass().isArray()) {
				Object[] paramValues = (Object[]) parameters;
				for (int i = 0; i < paramValues.length; i++) {
					if (paramValues[i] == null) {
						paramValues[i] = "";
					}
					parameterMap.put(Integer.toString(i), paramValues[i]);
				}
			} else if (parameters instanceof Map) {
				parameterMap = (Map<String, Object>) parameters;
			} else {
				Class<? extends Object> paramClass = parameters.getClass();
				Field[] fields = paramClass.getDeclaredFields();
				for (Field field : fields) {
					field.setAccessible(true);

					String fieldName = field.getName();
					Object fieldValue = null;
					try {
						fieldValue = field.get(parameters);
					} catch (Exception e) {
						fieldValue = null;
					}
					if (fieldName != null && fieldValue != null) {
						parameterMap.put(fieldName, fieldValue);
					}
				}
			}
		}

		return parameterMap;
	}
906236
@Override
    public void configure(String parameters) {
        if (parameters.isEmpty()) {
            return;
        }
        List<String> values = Op.split(parameters, " ");
        int required = 4;
        if (values.size() < required) {
            throw new RuntimeException(String.format(
                    "[configuration error] term <%s> requires <%d> parameters",
                    this.getClass().getSimpleName(), required));
        }
        Iterator<String> it = values.iterator();
        setMeanA(Op.toDouble(it.next()));
        setStandardDeviationA(Op.toDouble(it.next()));
        setMeanB(Op.toDouble(it.next()));
        setStandardDeviationB(Op.toDouble(it.next()));
        if (values.size() > required) {
            setHeight(Op.toDouble(it.next()));
        }
    }
1146662
@Override
    public void configure(String parameters) {
        if (parameters.isEmpty()) {
            return;
        }
        List<String> values = Op.split(parameters, " ");
        int required = 4;
        if (values.size() < required) {
            throw new RuntimeException(String.format(
                    "[configuration error] term <%s> requires <%d> parameters",
                    this.getClass().getSimpleName(), required));
        }
        Iterator<String> it = values.iterator();
        setLeft(Op.toDouble(it.next()));
        setRising(Op.toDouble(it.next()));
        setFalling(Op.toDouble(it.next()));
        setRight(Op.toDouble(it.next()));
        if (values.size() > required) {
            setHeight(Op.toDouble(it.next()));
        }
    }
3948
public static Class<?> classForNameOrNull(final String className) {
        try {
            return Class.forName(className);
        } catch (final ReflectiveOperationException | LinkageError e) {
            return null;
        }
    }
912281
@Override
	public void configure(Configuration parameters) {
		this.driverName = parameters.getString(DRIVER_KEY, null);
		this.username = parameters.getString(USERNAME_KEY, null);
		this.password = parameters.getString(PASSWORD_KEY, null);
		this.dbURL = parameters.getString(URL_KEY, null);
		this.query = parameters.getString(QUERY_KEY, null);
		this.fieldCount = parameters.getInteger(FIELD_COUNT_KEY, 0);
		this.batchInterval = parameters.getInteger(BATCH_INTERVAL, DEFAULT_BATCH_INTERVERAL);

		@SuppressWarnings("unchecked")
		Class<Value>[] classes = new Class[this.fieldCount];
		this.fieldClasses = classes;

		for (int i = 0; i < this.fieldCount; i++) {
			@SuppressWarnings("unchecked")
			Class<? extends Value> clazz = (Class<? extends Value>) parameters.getClass(FIELD_TYPE_KEY + i, null);
			if (clazz == null) {
				throw new IllegalArgumentException("Invalid configuration for JDBCOutputFormat: "
						+ "No type class for parameter " + i);
			}
			this.fieldClasses[i] = clazz;
		}
	}
14518
public static SettingsCommandUser build(String[] params)
    {
        GroupedOptions options = GroupedOptions.select(params,
                new Options(new Uncertainty()),
                new Options(new Duration()),
                new Options(new Count()));
        if (options == null)
        {
            printHelp();
            System.out.println("Invalid USER options provided, see output for valid options");
            System.exit(1);
        }
        return new SettingsCommandUser((Options) options);
    }
1324677
@SuppressWarnings( "unchecked" )
    private <T> Class<T> loadClassIfVisible( String className, ClassLoader classLoader )
    {
        try
        {
            Class<T> klass = (Class<T>) classLoader.loadClass( className );
            return klass;
        }
        catch ( ClassNotFoundException e )
        {
            return null;
        }
    }
795248
function visibilityFnParams(param1, param2, param3, param4) {
        //name must always be set
        if (param1 == undefined)
            throw new Error('feature.visibility(): 1st parameter name must be defined');

        if (arguments.length == 1)
            throw new Error('feature.visibility(): 2nd parameter name must be a boolean or function, but is empty');

        let name = param1, variant = null, data = null, result = null;
        if (param3 == undefined && param4 == undefined) {
            result = param2;
        }
        else if (param4 == undefined) {
            variant = param2;
            result = param3;
        }
        else {
            variant = param2;
            data = param3;
            result = param4;
        }

        return {
            name,
            variant,
            data,
            result
        }
    }
713367
public RunParams params(Map<String, Object> params) {
        if (params == null) {
            throw new NullPointerException("\"params\" parameter can not be null");
        }
        this.params.putAll(params);
        return this;
    }
1036475
public long create(String name, GpsTraceDetails.Visibility visibility, String description,
			final Iterable<GpsTrackpoint> trackpoints)
	{
		return create(name, visibility, description, null, trackpoints);
	}
832828
public void addConfiguredParam( Parameter param)
    {
    options_.getTransformParams().put( param.getName(), param.getValue());
    }
845117
private ClassName getStubClassName(TypeMirror param) {
        Element element = getBindingManager().getElement(param.toString());
        return ClassName.get(getPackage(element).getQualifiedName().toString(), element.getSimpleName() + ClassBuilder.STUB_SUFFIX);
    }