Returns unqualified class name (e.g. String, if java.lang.String)
NB: This method requires the given element has the kind of {@link ElementKind#CLASS}.
@param tm
@return unqualified class name
@author vvakame
197157
public static String getSimpleName(TypeMirror tm) {
		String str = tm.toString();
		int i = str.lastIndexOf(".");
		return str.substring(i + 1);
	}
229278
private String getFullyQualifiedName(Model model) {
        StringBuilder id = new StringBuilder();
        id.append((model.getGroupId() == null) ? "[inherited]" : model.getGroupId());
        id.append(":");
        id.append(model.getArtifactId());
        id.append(":pom:");
        id.append((model.getVersion() == null) ? "[inherited]" : model.getVersion());
        return id.toString();
    }
1096613
@Override
    public final T element() {
        // Short circuit using read-lock
        if (this.isEmpty()) {
            throw new NoSuchElementException();
        }

        final T e = this.peek();
        if (e == null) {
            throw new NoSuchElementException();
        }
        return e;
    }
698594
public static String getNameForNew(Element element) {
		if (element.getKind() != ElementKind.CLASS) {
			throw new IllegalStateException();
		}
		return getNameForNew("", element);
	}
496706
@Requires("element != null")
  public static TypeModel getTypeOf(ElementModel element) {
    return findEnclosingElement(element, TypeModel.class,
        ElementKind.CLASS, ElementKind.ENUM, ElementKind.INTERFACE);
  }
119510
@Override public String getQualifiedSurroundingClassName() {
    TypeElement typeElement = (TypeElement) field.getEnclosingElement();
    return typeElement.getQualifiedName().toString();
  }
1180526
private boolean isUnextendableNativeClass(NodeTraversal t, String className) {
    // This list originally taken from the list of built-in objects at
    // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference
    // as of 2016-10-22.
    // - Intl.* classes were left out, because it doesn't seem worth the extra effort
    //   of handling the qualified name.
    // - Deprecated and experimental classes were left out.
    switch (className) {
      case "Array":
      case "ArrayBuffer":
      case "Boolean":
      case "DataView":
      case "Date":
      case "Float32Array":
      case "Function":
      case "Generator":
      case "GeneratorFunction":
      case "Int16Array":
      case "Int32Array":
      case "Int8Array":
      case "InternalError":
      case "Map":
      case "Number":
      case "Promise":
      case "Proxy":
      case "RegExp":
      case "Set":
      case "String":
      case "Symbol":
      case "TypedArray":
      case "Uint16Array":
      case "Uint32Array":
      case "Uint8Array":
      case "Uint8ClampedArray":
      case "WeakMap":
      case "WeakSet":
        return !isDefinedInSources(t, className);
      default:
        return false;
    }
  }
298693
public String getFullyQualifiedNameForClassName(String className) {
    if (!classNameToFullyQualifiedName.containsKey(className)) {
      return className;
    }

    return classNameToFullyQualifiedName.get(className);
  }
568211
public String getName() {
    StringBuilder buffer = new StringBuilder();
    if (null != collectionClass) {
      buffer.append(collectionClass.getName());
    }
    buffer.append(':');
    if (null != indexClass) {
      buffer.append(indexClass.getName());
    }
    buffer.append(':');
    buffer.append(elementType.getName());
    return buffer.toString();
  }
247284
public String getShortName() {
        int endOfPkg = className.lastIndexOf('.');
        if (endOfPkg >= 0) {
            return className.substring(endOfPkg + 1);
        }
        return className;
    }
805028
public String getClassName() {
        switch (sort) {
        case VOID:
            return "void";
        case BOOLEAN:
            return "boolean";
        case CHAR:
            return "char";
        case BYTE:
            return "byte";
        case SHORT:
            return "short";
        case INT:
            return "int";
        case FLOAT:
            return "float";
        case LONG:
            return "long";
        case DOUBLE:
            return "double";
        case ARRAY:
            StringBuilder sb = new StringBuilder(getElementType().getClassName());
            for (int i = getDimensions(); i > 0; --i) {
                sb.append("[]");
            }
            return sb.toString();
        case OBJECT:
            return new String(buf, off, len).replace('/', '.').intern();
        default:
            return null;
        }
    }
83748
public String getBeanDefinitionQualifiedClassName() {
        String newClassName = beanDefinitionName;
        if (newClassName.endsWith("[]")) {
            newClassName = newClassName.substring(0, newClassName.length() - 2);
        }
        return newClassName + REF_SUFFIX;
    }
1125377
public Class<?> getClassByName(String name) throws ClassNotFoundException {
		Class<?> ret = getClassByNameOrNull(name);
		if (ret == null) {
			throw new ClassNotFoundException("Class " + name + " not found");
		}
		return ret;
	}
583561
static String getMethodSpecificName(Method m) {

        return m == null ? null
                         : m.getDeclaringClass().getName() + '.'
                           + getSignature(m);
    }
58780
public Term getTerm(String name) {
        for (Term term : this.terms) {
            if (name.equals(term.getName())) {
                return term;
            }
        }
        return null;
    }
600805
private static String fullQualifiedName(Tree tree) {
		if (tree.is(Tree.Kind.IDENTIFIER)) {
			return ((IdentifierTree) tree).name();
		} else if (tree.is(Tree.Kind.MEMBER_SELECT)) {
			MemberSelectExpressionTree m = (MemberSelectExpressionTree) tree;
			return fullQualifiedName(m.expression()) + "." + m.identifier().name();
		}
		throw new UnsupportedOperationException(String.format("Kind/Class '%s' not supported", tree.getClass()));
	}
540333
private <T> String buildClassListTag(final T t) {
        return (exportClassFullName != null)
                ? exportClassFullName
                : t.getClass().getSimpleName() + exportClassEnding;
    }