Drops the first argument with the given name.

@param name the name of the argument to drop
@return a new signature
490783
public Signature dropArg(String name) {
        String[] newArgNames = new String[argNames.length - 1];
        MethodType newType = methodType;

        for (int i = 0, j = 0; i < argNames.length; i++) {
            if (argNames[i].equals(name)) {
                newType = newType.dropParameterTypes(j, j + 1);
                continue;
            }
            newArgNames[j++] = argNames[i];
        }

        if (newType == null) {
            // arg name not found; should we error?
            return this;
        }

        return new Signature(newType, newArgNames);
    }
52737
public static Predicate<Class<?>> named(final String name) {
        return clazz -> clazz.getName().equals(name);
    }
1335815
public static String getPropertyName(String name) {
        if(name != null && (name.startsWith("get") || name.startsWith("set"))) {
            StringBuilder b = new StringBuilder(name);
            b.delete(0, 3);
            b.setCharAt(0, Character.toLowerCase(b.charAt(0)));
            return b.toString();
        } else {
            return name;
        }
    }
1181072
public String getFirstHeader(String name) {
        List<String> headerValues = getHeader(name);

        if (headerValues == null || headerValues.size() == 0) {
            return null;
        }

        return headerValues.get(0);
    }
861906
public final boolean hasAnnotation(final String name) {
        if (name == null) {
            throw new IllegalArgumentException("The argument 'name' cannot be NULL!");
        }
        for (int i = 0; i < annotations.size(); i++) {
            final SgAnnotation annotation = annotations.get(i);
            if (annotation.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }
443553
public static String simpleName(String name) {
		if (name == null) {
			return null;
		}
		final int index = name.lastIndexOf('.');
		if (index > 0) {
			return name.substring(index + 1);
		}
		return name;
	}
897203
public Component getComponentWithName(String name) {
        if (name == null || name.trim().length() == 0) {
            throw new IllegalArgumentException("A component name must be provided.");
        }

        Optional<Component> component = components.stream().filter(c -> name.equals(c.getName())).findFirst();
        return component.orElse(null);
    }
637484
public Integer registerName(final String name) {
		final Integer newid = Integer.valueOf(counter.incrementAndGet());
		final Integer assigned = map.putIfAbsent(name, newid);
		return (assigned == null ? newid : assigned);
	}
585124
private String replaceNonAlpha(String name) {
        String modifiedName = null;
        if (p != null)
            modifiedName = p.matcher(name).replaceAll("_");
        return modifiedName;
    }
184940
public App named(String name) {
        App newApp = copy();
        newApp.name = name;
        return newApp;
    }
780744
static String firstToLower(String name){
        if (name.length() == 1){
            return name.toLowerCase();
        }

        String firstLetter = name.substring(0, 1).toLowerCase();
        return firstLetter + name.substring(1);
    }
394215
private T createOrThrow(String name) {
        T constant = constants.get(name);
        if (constant == null) {
            final T tempConstant = newConstant(nextId(), name);
            constant = constants.putIfAbsent(name, tempConstant);
            if (constant == null) {
                return tempConstant;
            }
        }

        throw new IllegalArgumentException(String.format("'%s' is already in use", name));
    }
581093
public String toMethodSignature(String name) {
        StringBuffer buf = new StringBuffer();
        buf.append(mRetType.getFullName());
        buf.append(' ');
        buf.append(name);
        buf.append('(');

        TypeDesc[] params = mParams;
        for (int i=0; i<params.length; i++) {
            if (i > 0) {
                buf.append(", ");
            }
            buf.append(params[i].getFullName());
        }

        return buf.append(')').toString();
    }
972410
public static String sanitizeName(String name) {

        if (name  == null)
            throw new NullPointerException("Parameter name cannot be null");

        name = name.trim();

        if (name.length() == 0)
            throw new IllegalArgumentException("Parameter name cannot be empty");

        StringBuilder ret = new StringBuilder("");

        for (int i = 0; i < name.length(); i++) {
            char ch = name.charAt(i);
            if (Character.isLetter(ch) || Character.isDigit(ch)) {
                ret.append(ch);
            } else {
                ret.append("_");
            }

        }

        return ret.toString();
    }
547910
public SymbolType withName(String name) {
        return clone(marker, name, arrayCount, typeVariable, null, null);
    }
1154023
public Signature dropLast(int n) {
        return new Signature(
                methodType.dropParameterTypes(methodType.parameterCount() - n, methodType.parameterCount()),
                Arrays.copyOfRange(argNames, 0, argNames.length - n));
    }
40822
public static RelaxedNames forCamelCase(String name) {
        StringBuilder result = new StringBuilder();
        for (char c : name.toCharArray()) {
            result.append(Character.isUpperCase(c) && result.length() > 0
                          && result.charAt(result.length() - 1) != '-' ? "-" + Character.toLowerCase(c) : c);
        }
        return new RelaxedNames(result.toString());
    }