Return the argument kind (required, advanced, hidden, etc) of this argumentDefinition

@param argumentDefinition
@return
438257
private String docKindOfArg(final NamedArgumentDefinition argumentDefinition) {

        // deprecated
        // required (common or otherwise)
        // common optional
        // advanced
        // hidden

        // Required first (after positional, which are separate), regardless of what else it might be
        if (argumentDefinition.isDeprecated()) {
            return "deprecated";
        }
        if (argumentDefinition.isControlledByPlugin()) {
            return "dependent";
        }
        if (!argumentDefinition.isOptional()) {
            return "required";
        }
        if (argumentDefinition.isCommon()) {  // these will all be optional
            return "common";
        }
        if (argumentDefinition.isAdvanced()) {
            return "advanced";
        }
        if (argumentDefinition.isHidden()) {
            return "hidden";
        }
        return "optional";
    }
856159
public String getArgDecl(HashMap<String,TypeMirror> bindingMap)
    {
        StringBuffer sb = new StringBuffer();

        if ( _methodDecl.getParameters() == null )
            return "";
        
        int i = 0;
        for (ParameterDeclaration paramDecl : _methodDecl.getParameters())
        {
            TypeMirror paramType = paramDecl.getType();
            if ( paramType == null )
                return "";
                
            if (bindingMap != null && bindingMap.containsKey(paramType.toString()))
                paramType = bindingMap.get(paramType.toString());

            if (i != 0)
                sb.append(", ");
            
            sb.append(paramType.toString());

            sb.append(' ');

            // BUGBUG: when the MethodDeclaration is derived from Reflection, this seems
            // to return 'arg0' for all arguments!
            String argName = paramDecl.getSimpleName();
            if (argName.equals("arg0"))
                sb.append("arg" + i);
            else
                sb.append(argName);

            i++;
        }
        return sb.toString();
    }
622144
public static Optional<Method> getDeclaredMethod(Class type, String methodName, Class... argTypes) {
        try {
            return Optional.of(type.getDeclaredMethod(methodName, argTypes));
        } catch (NoSuchMethodException e) {
            return Optional.empty();
        }
    }
1092463
@Override
    protected Optional<TermType> reduceInferredTypes(ImmutableList<Optional<TermType>> argumentTypes) {
        if (argumentTypes.stream().allMatch(Optional::isPresent)) {
            return argumentTypes.stream()
                    .map(Optional::get)
                    .map(t -> (ConcreteNumericRDFDatatype) t)
                    .reduce(ConcreteNumericRDFDatatype::getCommonPropagatedOrSubstitutedType)
                    .map(t -> (TermType) t);
        }
        return Optional.empty();
    }
1330277
protected int describeArgsTo(Description description) {
        for (int i = 0; i < args.length; i++) {
            if (i > 0) description.appendText(", ");
            description.appendValue(args[i]);
        }
        return args.length;
    }
376567
public List<HeadedSyntacticCategory> getArgumentTypes() { 
    List<HeadedSyntacticCategory> arguments = Lists.newArrayList();
    HeadedSyntacticCategory cat = this;
    while (!cat.isAtomic()) {
      arguments.add(cat.getArgumentType());
      cat = cat.getReturnType();
    }
    return arguments;
  }
1221927
@Override
    public IPortletDefinition getPortletDefinition(IPortletDefinitionId portletDefinitionId) {
        Validate.notNull(portletDefinitionId, "portletDefinitionId can not be null");

        return this.portletDefinitionDao.getPortletDefinition(portletDefinitionId);
    }
168033
public static String argumentUnitToString(ArgumentUnit argumentUnit)
    {
        return String.format("%s [%d, %d] \"%s\"", argumentUnit.getType().getShortName(),
                argumentUnit.getBegin(), argumentUnit.getEnd(), argumentUnit.getCoveredText());
    }
858803
private static Class<?> findTypeFromGenericInArguments(final InvocationOnMock invocation, final TypeVariable returnType) {
        final Type[] parameterTypes = invocation.getMethod().getGenericParameterTypes();
        for (int i = 0; i < parameterTypes.length; i++) {
            Type argType = parameterTypes[i];
            if (returnType.equals(argType)) {
                Object argument = invocation.getArgument(i);

                if (argument == null) {
                    return null;
                }

                return argument.getClass();
            }
            if (argType instanceof GenericArrayType) {
                argType = ((GenericArrayType) argType).getGenericComponentType();
                if (returnType.equals(argType)) {
                    return invocation.getArgument(i).getClass();
                }
            }
        }
        return null;
    }
1241170
private static Class<?>[] getTypes(final Object... args) {
    final Class<?>[] argTypes = new Class<?>[args.length];
    for (int i = 0; i < argTypes.length; i++) {
      argTypes[i] = args[i].getClass();
    }
    return argTypes;
  }
759968
private MutableSecondaryTypeDefinition getSecondaryTypeDefinition(final String typeId, final boolean includePropertyDefinitions, final boolean baseType) {

		final TypeDefinitionFactory factory      = TypeDefinitionFactory.newInstance();
		final MutableSecondaryTypeDefinition def = factory.createSecondaryTypeDefinition(CmisVersion.CMIS_1_1, baseType ? null : BaseTypeId.CMIS_SECONDARY.value());

		def.setIsCreatable(false);

		initializeExtendedType(def, typeId);

		if (!includePropertyDefinitions) {
			def.removeAllPropertyDefinitions();
		}

		return def;
	}
210276
public String getLiteralType(Type type) {
		String result = "";
		if (type != null) {
			if (ParameterizedType.class.isAssignableFrom(type.getClass())) {
				ParameterizedType parameterizedType = (ParameterizedType) type;
				result = parameterizedType.toString();
			} else {
				result = ((Class) type).getCanonicalName();
			}
		}
		return result;
	}
832315
public String getArgList(boolean quoteDelimit)
    {
        StringBuffer sb = new StringBuffer();
        int i = 0;

        if ( _methodDecl.getParameters() == null )
            return "";
        
        for (ParameterDeclaration paramDecl : _methodDecl.getParameters())
        {
            if (i != 0)
                sb.append(", ");

            // BUGBUG: when the MethodDeclaration is derived from Reflection, this seems
            // to return 'arg0' for all arguments!
            String argName = paramDecl.getSimpleName();
            if (quoteDelimit) sb.append('"');
            if (argName.equals("arg0"))
                sb.append("arg" + i);
            else
                sb.append(argName);
            if (quoteDelimit) sb.append('"');
            i++;
        }
        return sb.toString();
    }
466325
public String typeArguments() throws RecognitionException {
        String typeArguments = "";
        try {
            int first = input.index();
            Token token = match( input,
                                 DRL5Lexer.LESS,
                                 null,
                                 new int[]{DRL5Lexer.QUESTION, DRL5Lexer.ID},
                                 DroolsEditorType.SYMBOL );
            if ( state.failed ) return typeArguments;

            typeArgument();
            if ( state.failed ) return typeArguments;

            while ( input.LA( 1 ) == DRL5Lexer.COMMA ) {
                token = match( input,
                               DRL5Lexer.COMMA,
                               null,
                               new int[]{DRL5Lexer.QUESTION, DRL5Lexer.ID},
                               DroolsEditorType.IDENTIFIER );
                if ( state.failed ) return typeArguments;

                typeArgument();
                if ( state.failed ) return typeArguments;
            }

            token = match( input,
                           DRL5Lexer.GREATER,
                           null,
                           null,
                           DroolsEditorType.SYMBOL );
            if ( state.failed ) return typeArguments;
            typeArguments = input.toString( first,
                                            token.getTokenIndex() );

        } catch ( RecognitionException re ) {
            reportError( re );
        }
        return typeArguments;
    }
1056735
public static Type[] getActualTypeArguments(Class<?> clazz) {
        Type type = Types.getCanonicalType(clazz);
        if (type instanceof ParameterizedType) {
            return ((ParameterizedType) type).getActualTypeArguments();
        } else {
            return EMPTY_TYPES;
        }
    }
182409
@SuppressWarnings("unchecked")
  protected Class<T> getParameterizedType() {
    Class<T> clazz = (Class<T>) ((ParameterizedType) this.getClass().getGenericSuperclass())
        .getActualTypeArguments()[0];
    return clazz;
  }
419254
public static Class<? extends ArgumentExtractor> getArgumentExtractor(Parameter parameter) {
        for (Annotation annotation : parameter.getAnnotations()) {
            if (annotation.annotationType().isAnnotationPresent(ExtractWith.class)) {
                ExtractWith with = annotation.annotationType().getAnnotation(ExtractWith.class);
                Class<? extends ArgumentExtractor> extractorClass = with.value();
                return extractorClass;
            }
        }
        // if unspecified we use the ParamExtractor
        return ParamExtractor.class;
    }