Creates a name based on the given {@link TypeName}. Names are constants, so will use
{@link CaseFormat#UPPER_UNDERSCORE} formatting.
552338
String getName(TypeName typeName) {
    String name = typeToNames.get(typeName);
    if (name != null) {
      return name;
    }
    name = getNameInternal(typeName);
    name = CaseFormat.UPPER_CAMEL.to(CaseFormat.UPPER_UNDERSCORE, name);
    name = adapterNames.getUniqueName(name);
    typeToNames.put(typeName, name);
    return name;
  }
851013
public final void typeName() throws RecognitionException {
		int typeName_StartIndex = input.index();

		try {
			if ( state.backtracking>0 && alreadyParsedRule(input, 49) ) { return; }

			// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:527:5: ( Identifier | packageOrTypeName '.' Identifier )
			int alt66=2;
			int LA66_0 = input.LA(1);
			if ( (LA66_0==Identifier) ) {
				int LA66_1 = input.LA(2);
				if ( (LA66_1==EOF) ) {
					alt66=1;
				}
				else if ( (LA66_1==47) ) {
					alt66=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 66, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 66, 0, input);
				throw nvae;
			}

			switch (alt66) {
				case 1 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:527:9: Identifier
					{
					match(input,Identifier,FOLLOW_Identifier_in_typeName1745); if (state.failed) return;
					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/semantics/java/parser/Java.g:528:9: packageOrTypeName '.' Identifier
					{
					pushFollow(FOLLOW_packageOrTypeName_in_typeName1755);
					packageOrTypeName();
					state._fsp--;
					if (state.failed) return;
					match(input,47,FOLLOW_47_in_typeName1757); if (state.failed) return;
					match(input,Identifier,FOLLOW_Identifier_in_typeName1759); if (state.failed) return;
					}
					break;

			}
		}
		catch (RecognitionException re) {
			reportError(re);
			recover(input,re);
		}
		finally {
			// do for sure before leaving
			if ( state.backtracking>0 ) { memoize(input, 49, typeName_StartIndex); }

		}
	}
503620
public String simpleTypeName() {
        String typeName = qualifiedTypeName();
        int lastDot = typeName.lastIndexOf('.');
        if (lastDot < 0) return typeName;
        return typeName.substring(lastDot + 1);
    }
1360940
static String formatName(String name)
   {
      return name == null ? null : name.replaceAll(" ", "").replaceAll("[,;]", ", ");
   }
1028854
@SuppressWarnings("unchecked")
    public <T extends XPathBuilder> T setName(final String name) {
        this.name = name;
        return (T) this;
    }
1255447
public static boolean matchesTypeName(Class<?> clazz, String typeName) {
		return (typeName != null &&
				(typeName.equals(clazz.getName()) || typeName.equals(clazz.getSimpleName()) ||
				(clazz.isArray() && typeName.equals(getQualifiedNameForArray(clazz)))));
	}
248381
public static TypeName typeName(String typeName) {
		TypeName[] values = { TypeName.BOOLEAN, TypeName.BYTE, TypeName.CHAR, TypeName.DOUBLE, TypeName.FLOAT,
				TypeName.INT, TypeName.LONG, TypeName.SHORT, TypeName.VOID };

		for (TypeName item : values) {
			if (item.toString().equals(typeName)) {
				return item;
			}
		}

		LiteralType literalName = LiteralType.of(typeName);
		if (literalName.isParametrizedType()) {
			return ParameterizedTypeName.get(className(literalName.getRawType()),
					typeName(literalName.getTypeParameter()));
		}
		if (literalName.isArray()) {
			return ArrayTypeName.of(typeName(literalName.getRawType()));
		}

		return ClassName.bestGuess(typeName);
	}
997358
static String generateFullMetricName(String name, String type) {
    return SOURCE + DELIMITER + name + DELIMITER + type;
  }
955891
public static String getNameWithTypeParameters(IType type) {
		assert type != null;
		final String superName = type.getFullyQualifiedName('.');
		if (!JavaModelUtil.is50OrHigher(type.getJavaProject())) {
			return superName;
		}
		try {
			final ITypeParameter[] typeParameters = type.getTypeParameters();
			if (typeParameters != null && typeParameters.length > 0) {
				final StringBuffer buf = new StringBuffer(superName);
				buf.append('<');
				for (int k = 0; k < typeParameters.length; ++k) {
					if (k != 0) {
						buf.append(',').append(' ');
					}
					buf.append(typeParameters[k].getElementName());
				}
				buf.append('>');
				return buf.toString();
			}
		} catch (JavaModelException e) {
			// ignore
		}
		return superName;

	}
163074
@SuppressWarnings("unchecked")
    public <T extends WebLocatorAbstractBuilder> T setName(final String name) {
        pathBuilder.setName(name);
        return (T) this;
    }
510210
function (typeName) {
    switch (typeName) {
        case Constants.STRING_TYPE: return true;
        case Constants.NUMBER_TYPE: return true;
        case Constants.BOOLEAN_TYPE: return true;
        case Constants.DATE_TYPE: return true;
        case Constants.STRING_TYPE_LOWERCASE: return true;
        case Constants.NUMBER_TYPE_LOWERCASE: return true;
        case Constants.BOOLEAN_TYPE_LOWERCASE: return true;
        case Constants.DATE_TYPE_LOWERCASE: return true;
        default: return false;
    }
}
692961
static ConstantNameAndTypeInfo make(ConstantPool cp, 
                                        String name,
                                        Descriptor type) {
        ConstantInfo ci = new ConstantNameAndTypeInfo(cp, name, type);
        return (ConstantNameAndTypeInfo)cp.addConstant(ci);
    }
924608
public String generateName(String name) {
    checkName(name);
    names.add(name);
    int count = names.count(name);
    if (count == 1) {
      return name;
    }
    return name + collisionSeparator + (count - 1);
  }
676479
public final TypeInfo innerClass(String simpleName) {
    checkArgument(
        simpleName.indexOf('$') == -1, "Simple names shouldn't contain '$': %s", simpleName);
    String className = className() + '$' + simpleName;
    String internalName = internalName() + '$' + simpleName;
    Type type = Type.getObjectType(internalName);
    return new AutoValue_TypeInfo(className, simpleName, internalName, type);
  }
556917
public final void createdName() throws RecognitionException {
		try {
			// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:609:5: ( ID ( typeArguments )? ( DOT ID ( typeArguments )? )* | primitiveType )
			int alt71=2;
			int LA71_0 = input.LA(1);
			if ( (LA71_0==ID) ) {
				int LA71_1 = input.LA(2);
				if ( (!(((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.LONG)))||((helper.validateIdentifierKey(DroolsSoftKeywords.BOOLEAN)))||((helper.validateIdentifierKey(DroolsSoftKeywords.BYTE)))||((helper.validateIdentifierKey(DroolsSoftKeywords.FLOAT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.DOUBLE)))||((helper.validateIdentifierKey(DroolsSoftKeywords.INT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.CHAR))))))) ) {
					alt71=1;
				}
				else if ( ((((helper.validateIdentifierKey(DroolsSoftKeywords.SHORT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.LONG)))||((helper.validateIdentifierKey(DroolsSoftKeywords.BOOLEAN)))||((helper.validateIdentifierKey(DroolsSoftKeywords.BYTE)))||((helper.validateIdentifierKey(DroolsSoftKeywords.FLOAT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.DOUBLE)))||((helper.validateIdentifierKey(DroolsSoftKeywords.INT)))||((helper.validateIdentifierKey(DroolsSoftKeywords.CHAR))))) ) {
					alt71=2;
				}

				else {
					if (state.backtracking>0) {state.failed=true; return;}
					int nvaeMark = input.mark();
					try {
						input.consume();
						NoViableAltException nvae =
							new NoViableAltException("", 71, 1, input);
						throw nvae;
					} finally {
						input.rewind(nvaeMark);
					}
				}

			}

			else {
				if (state.backtracking>0) {state.failed=true; return;}
				NoViableAltException nvae =
					new NoViableAltException("", 71, 0, input);
				throw nvae;
			}

			switch (alt71) {
				case 1 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:609:7: ID ( typeArguments )? ( DOT ID ( typeArguments )? )*
					{
					match(input,ID,FOLLOW_ID_in_createdName3476); if (state.failed) return;
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:609:10: ( typeArguments )?
					int alt68=2;
					int LA68_0 = input.LA(1);
					if ( (LA68_0==LESS) ) {
						alt68=1;
					}
					switch (alt68) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:609:10: typeArguments
							{
							pushFollow(FOLLOW_typeArguments_in_createdName3478);
							typeArguments();
							state._fsp--;
							if (state.failed) return;
							}
							break;

					}

					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:610:9: ( DOT ID ( typeArguments )? )*
					loop70:
					while (true) {
						int alt70=2;
						int LA70_0 = input.LA(1);
						if ( (LA70_0==DOT) ) {
							alt70=1;
						}

						switch (alt70) {
						case 1 :
							// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:610:11: DOT ID ( typeArguments )?
							{
							match(input,DOT,FOLLOW_DOT_in_createdName3491); if (state.failed) return;
							match(input,ID,FOLLOW_ID_in_createdName3493); if (state.failed) return;
							// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:610:18: ( typeArguments )?
							int alt69=2;
							int LA69_0 = input.LA(1);
							if ( (LA69_0==LESS) ) {
								alt69=1;
							}
							switch (alt69) {
								case 1 :
									// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:610:18: typeArguments
									{
									pushFollow(FOLLOW_typeArguments_in_createdName3495);
									typeArguments();
									state._fsp--;
									if (state.failed) return;
									}
									break;

							}

							}
							break;

						default :
							break loop70;
						}
					}

					}
					break;
				case 2 :
					// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:611:11: primitiveType
					{
					pushFollow(FOLLOW_primitiveType_in_createdName3510);
					primitiveType();
					state._fsp--;
					if (state.failed) return;
					}
					break;

			}
		}

		catch (RecognitionException re) {
		    throw re;
		}

		finally {
			// do for sure before leaving
		}
	}
1226786
public void setName(String name) {
        this.name = name;

        List<Token> tokens = Tokenizer.tokenize(name, true);
        int tokenCount = 0;

        for (Token t : tokens) {
            if (t.getType() != TokenType.TEXT) {
                tokenCount++;
            }
        }

        if (tokenCount > 0) {
            this.nameTokens = tokens.toArray(new Token[0]);
        } else {
            this.nameTokens = null;
        }
    }
664996
function XName(name) {
        if (TypeUtils.isNullOrUndefined(name)) {
            throw "Name cannot be (null) or (undefined)!";
        }
        name = ('' + name).trim();
        var ns = null;
        var ln = name;
        if (ln.indexOf(':') > -1) {
            var parts = ln.split(':');
            if (2 !== parts.length) {
                throw "Cannot have more than one separator!";
            }
            ns = parts[0].trim();
            ln = parts[1].trim();
        }
        if ('' === ln) {
            throw "Local name cannot be empty!";
        }
        if (null !== ns) {
            ns = ns.trim();
            if ('' === ns) {
                ns = null;
            }
        }
        this._namespace = ns;
        this._localName = ln;
    }