Returns whether a Protege instance is a Parameter.

@param extendedParameter a Protege instance that is assumed to be a
Proposition.
@return <code>true</code> if the provided Protege instance is a
Parameter, <code>false</code> otherwise.
359776
private static boolean isParameter(Instance extendedParameter,
            ConnectionManager cm) throws KnowledgeSourceReadException {
        Instance proposition = (Instance) cm.getOwnSlotValue(extendedParameter,
                cm.getSlot("proposition"));
        if (proposition.hasType(cm.getCls("Parameter"))) {
            return true;
        } else {
            return false;
        }
    }
600822
private boolean handleAdditionalAnnotation(List<Parameter> parameters, Annotation annotation,
                                               final Type type, Set<Type> typesToSkip, javax.ws.rs.Consumes classConsumes,
                                               javax.ws.rs.Consumes methodConsumes, Components components, boolean includeRequestBody) {
        boolean processed = false;
        if (BeanParam.class.isAssignableFrom(annotation.getClass())) {
            // Use Jackson's logic for processing Beans
            final BeanDescription beanDesc = mapper.getSerializationConfig().introspect(constructType(type));
            final List<BeanPropertyDefinition> properties = beanDesc.findProperties();

            for (final BeanPropertyDefinition propDef : properties) {
                final AnnotatedField field = propDef.getField();
                final AnnotatedMethod setter = propDef.getSetter();
                final AnnotatedMethod getter = propDef.getGetter();
                final List<Annotation> paramAnnotations = new ArrayList<Annotation>();
                final Iterator<OpenAPIExtension> extensions = OpenAPIExtensions.chain();
                Type paramType = null;

                // Gather the field's details
                if (field != null) {
                    paramType = field.getType();

                    for (final Annotation fieldAnnotation : field.annotations()) {
                        if (!paramAnnotations.contains(fieldAnnotation)) {
                            paramAnnotations.add(fieldAnnotation);
                        }
                    }
                }

                // Gather the setter's details but only the ones we need
                if (setter != null) {
                    // Do not set the param class/type from the setter if the values are already identified
                    if (paramType == null) {
                        // paramType will stay null if there is no parameter
                        paramType = setter.getParameterType(0);
                    }

                    for (final Annotation fieldAnnotation : setter.annotations()) {
                        if (!paramAnnotations.contains(fieldAnnotation)) {
                            paramAnnotations.add(fieldAnnotation);
                        }
                    }
                }

                // Gather the getter's details but only the ones we need
                if (getter != null) {
                    // Do not set the param class/type from the getter if the values are already identified
                    if (paramType == null) {
                        paramType = getter.getType();
                    }

                    for (final Annotation fieldAnnotation : getter.annotations()) {
                        if (!paramAnnotations.contains(fieldAnnotation)) {
                            paramAnnotations.add(fieldAnnotation);
                        }
                    }
                }

                if (paramType == null) {
                    continue;
                }

                // Re-process all Bean fields and let the default swagger-jaxrs/swagger-jersey-jaxrs processors do their thing
                List<Parameter> extracted = extensions.next().extractParameters(
                                                                                paramAnnotations,
                                                                                paramType,
                                                                                typesToSkip,
                                                                                components,
                                                                                classConsumes,
                                                                                methodConsumes,
                                                                                includeRequestBody,
                                                                                extensions).parameters;

                for (Parameter p : extracted) {
                    if (ParameterProcessor.applyAnnotations(
                                                            p,
                                                            paramType,
                                                            paramAnnotations,
                                                            components,
                                                            classConsumes == null ? new String[0] : classConsumes.value(),
                                                            methodConsumes == null ? new String[0] : methodConsumes.value()) != null) {
                        parameters.add(p);
                    }
                }

                processed = true;
            }
        }
        return processed;
    }
1235731
protected boolean isRequired(Parameter parameter) {
        return parameter.isAnnotationPresent(Body.class)
                || parameter.isAnnotationPresent(Required.class)
                || parameter.isAnnotationPresent(NotNull.class);
    }
1212610
@SuppressWarnings("unchecked")
    public <T extends Annotation> T getParameterAnnotation(Class<T> annotationType) {
        Annotation[] anns = getParameterAnnotations();
        for (Annotation ann : anns) {
            if (annotationType.isInstance(ann)) {
                return (T) ann;
            }
        }
        return null;
    }
559867
private boolean isQuotableParam(String name){
            boolean isQuotableParameter = false;
            List<String> params = getQuotableParams();
            for (String param : params){
                if (param.equalsIgnoreCase(name)){
                    isQuotableParameter = true;
                    break;
                }
            }
            return isQuotableParameter;
        }
738668
public static boolean containsSyntheticParameterName(MethodSymbol sym) {
    return sym.getParameters().stream()
        .anyMatch(p -> SYNTHETIC_PARAMETER_NAME.matcher(p.getSimpleName()).matches());
  }
1184333
public static String andOr(Object parameter) {
        if (parameter instanceof Example.Criteria) {
            return ((Example.Criteria) parameter).getAndOr();
        } else if (parameter instanceof Example.Criterion) {
            return ((Example.Criterion) parameter).getAndOr();
        } else if (parameter.getClass().getCanonicalName().endsWith("Criteria")) {
            return "or";
        } else {
            return "and";
        }
    }
73274
public static boolean isParameterizedType(final Type type) {
        return type != null && type instanceof ParameterizedType && ((ParameterizedType) type).getActualTypeArguments().length > 0;
    }
635479
@Override
  public boolean isOptionalParameter(Node parameter) {
    return super.isOptionalParameter(parameter)
        || (parameter.isName() && parameter.getString().startsWith(OPTIONAL_ARG_PREFIX));
  }
1159375
public static boolean isVarArg(List<? extends XtendParameter> params) {
		assert params != null;
		if (params.size() > 0) {
			final XtendParameter param = params.get(params.size() - 1);
			assert param != null;
			return param.isVarArg();
		}
		return false;
	}
448646
public static void getExtensions(Map<String, String> map)
                    throws IllegalArgumentException {
        if (map == null) {
            throw new IllegalArgumentException(
                            "Parameter 'map' can not be null.");
        }
        if (recursion.get() == Boolean.TRUE) {
            return;
        }
        recursion.set(Boolean.TRUE);
        LinkedList<String> cleanup = new LinkedList<String>();
        r.lock();
        try {
            for (Map.Entry<String, WeakReference<Extension>> entry : extensionMap
                            .entrySet()) {
                Extension extension = entry.getValue().get();
                if (extension == null) {
                    cleanup.add(entry.getKey());
                } else {
                    String value = extension.getValue();
                    if (value != null) {
                        map.put(entry.getKey(), value);
                    }
                }
            }
        } finally {
            r.unlock();
            recursion.remove();
        }
        if (cleanup.size() > 0) {
            w.lock();
            try {
                for (String key : cleanup) {
                    WeakReference<Extension> extension = extensionMap
                                    .remove(key);
                    if (extension != null && extension.get() != null) {
                        // Special case! Somebody has put new extension for this
                        // key after we released
                        // read lock and before we took write lock. We need to
                        // put it back.
                        extensionMap.put(key, extension);
                    }
                }
            } finally {
                w.unlock();
            }
        }
        if (extensions.get() != null) {
            for (Entry<String, String> entry : extensions.get().entrySet()) {
                map.put(entry.getKey(), entry.getValue());
            }
        }

    }
815861
@Override
    public boolean equalsIgnoringTypeParams(final TypeSignature other) {
        if (other instanceof ClassRefTypeSignature) {
            if (((ClassRefTypeSignature) other).className.equals("java.lang.Object")) {
                // java.lang.Object can be reconciled with any type, so it can be reconciled with
                // any type variable
                return true;
            }
            // Resolve the type variable against the containing class' type parameters
            TypeParameter typeParameter;
            try {
                typeParameter = resolve();
            } catch (final IllegalArgumentException e) {
                // If the corresponding type parameter cannot be resolved:
                // unknown type variables can always be reconciled with a concrete class
                return true;
            }
            if (typeParameter.classBound == null
                    && (typeParameter.interfaceBounds == null || typeParameter.interfaceBounds.isEmpty())) {
                // If the type parameter has no bounds, just assume the type variable can be reconciled
                // to the class by type inference
                return true;
            }
            if (typeParameter.classBound != null) {
                if (typeParameter.classBound instanceof ClassRefTypeSignature) {
                    if (typeParameter.classBound.equals(other)) {
                        // T extends X, and X == other
                        return true;
                    }
                } else if (typeParameter.classBound instanceof TypeVariableSignature) {
                    // "X" is reconcilable with "Y extends X"
                    return this.equalsIgnoringTypeParams(typeParameter.classBound);
                } else /* if (typeParameter.classBound instanceof ArrayTypeSignature) */ {
                    return false;
                }
            }
            if (typeParameter.interfaceBounds != null) {
                for (final ReferenceTypeSignature interfaceBound : typeParameter.interfaceBounds) {
                    if (interfaceBound instanceof ClassRefTypeSignature) {
                        if (interfaceBound.equals(other)) {
                            // T implements X, and X == other
                            return true;
                        }
                    } else if (interfaceBound instanceof TypeVariableSignature) {
                        // "X" is reconcilable with "Y implements X"
                        return this.equalsIgnoringTypeParams(interfaceBound);
                    } else /* if (interfaceBound instanceof ArrayTypeSignature) */ {
                        return false;
                    }
                }
            }
            // Type variable has a concrete bound that is not reconcilable with 'other'
            // (we don't follow the class hierarchy to compare the bound against the class reference,
            // since the compiler should only use the bound during type erasure, not some other class
            // in the class hierarchy)
            return false;
        }
        // Technically I think type variables are never equal to each other, due to capturing,
        // but just compare the variable name for equality here (this should never get
        // triggered in general, since we only compare type-erased signatures to
        // non-type-erased signatures currently).
        return this.equals(other);
    }
180843
public <T extends IGeneratorParameter<?>> boolean hasParameter(Class<T> param) {
        return renderingParameters.containsKey(param.getName());
    }
1000149
@Override
  public Method getMethod(String methodName, int parameterCount) {
    for (Method method : methods) {
      if (method.getName().equals(methodName) && method.getParameters().size() == parameterCount) {
        return method;
      }
    }
    if (extending != null) {
      return extending.getMethod(methodName, parameterCount);
    }
    return null;
  }
610474
public static <T extends Executable> Predicate<T> executableHasSameParameterTypesAs(T reference) {
        return candidate -> {
            if (candidate == null) {
                return false;
            }
            Class<?>[] candidateParameterTypes = candidate.getParameterTypes();
            Class<?>[] referenceParameterTypes = reference.getParameterTypes();
            if (candidateParameterTypes.length != referenceParameterTypes.length) {
                return false;
            }
            for (int i = 0; i < candidateParameterTypes.length; i++) {
                if (!candidateParameterTypes[i].equals(referenceParameterTypes[i])) {
                    return false;
                }
            }
            return true;
        };
    }
494922
private static boolean validParameter(final Parameter p) {
        if (p.getNamespace() == null) {
            return false;
        }
        if (p.getValue() == null) {
            return false;
        }
        return true;
    }
698035
private boolean hasNoDefaultValueAndNoValuePassedOnAlternativeName(Option o, Map<String, String> data)
			throws RequiredParametersException {
		if (o.hasAlt() && data.containsKey(o.getAlt())) {
			data.put(o.getName(), data.get(o.getAlt()));
		} else {
			if (o.hasDefaultValue()) {
				data.put(o.getName(), o.getDefaultValue());
				if (o.hasAlt()) {
					data.put(o.getAlt(), o.getDefaultValue());
				}
			} else {
				return true;
			}
		}
		return false;
	}