Get the name of the class without the package.

@param sClassName
The fully qualified name of the class. May be <code>null</code>.
@return The local name of the passed class. Never <code>null</code>.
503185
@Nullable
  public static String getClassLocalName (@Nullable final String sClassName)
  {
    if (sClassName == null)
      return null;

    final int nIndex = sClassName.lastIndexOf ('.');
    return nIndex == -1 ? sClassName : sClassName.substring (nIndex + 1);
  }
614059
String getClassnameFromProxyname(String proxyname) {
		Pattern pattern = Pattern.compile("[@$]");
		Matcher matcher = pattern.matcher(proxyname);
		matcher.find();
		matcher.start();
		return proxyname.substring(0, matcher.start());
	}
600454
public String getTeaFullClassName(Class<?> clazz) {

        if (isImplicitTeaImport(clazz)) {
            return getClassName(clazz);
        }
        
        return getFullClassName(clazz);
    }
232890
public static Object getClassForName(String className) {
        Object object = null;
        try {
            Class classDefinition = Class.forName(className);
            object = classDefinition.newInstance();
        } catch (ClassNotFoundException e) {
            if (log.isEnabledFor(Level.ERROR)) {
                log.error("ClassNotFoundException", e);
            }
        } catch (InstantiationException e) {
            if (log.isEnabledFor(Level.ERROR)) {
                log.error("InstantiationException " + e.getMessage(), e);
            }
        } catch (IllegalAccessException e) {
            if (log.isEnabledFor(Level.ERROR)) {
                log.error("IllegalAccessException", e);
            }
        }
        return object;
    }
1318461
public static ClassName className(String className) {
		int index = className.lastIndexOf(".");
		if (index > 0) {
			return classNameWithSuffix(className.substring(0, index), className.substring(index + 1), "");
		}
		return ClassName.get("", className);

	}
1355308
private static String getPackageName(String className) {
        int end = className.lastIndexOf('.');
        return (end > 0) ? className.substring(0, end) : "";
    }
987109
public static String getClassName(QName qname) {
		try {
			StringBuilder className = new StringBuilder();

			// e.g., {http://www.w3.org/2001/XMLSchema}decimal
			StringTokenizer st1 = new StringTokenizer(qname.getNamespaceURI(),
					"/");
			// --> "http:" -> "www.w3.org" --> "2001" -> "XMLSchema"
			st1.nextToken(); // protocol, e.g. "http:"
			String domain = st1.nextToken(); // "www.w3.org"

			StringTokenizer st2 = new StringTokenizer(domain, ".");
			List<String> lDomain = new ArrayList<String>();
			while (st2.hasMoreTokens()) {
				lDomain.add(st2.nextToken());
			}
			assert (lDomain.size() >= 2);
			className.append(lDomain.get(lDomain.size() - 1)); // "org"
			className.append('.');
			className.append(lDomain.get(lDomain.size() - 2)); // "w3"

			while (st1.hasMoreTokens()) {
				className.append('.');
				className.append(st1.nextToken());
			}

			className.append('.');
			className.append(qname.getLocalPart());

			return className.toString();
		} catch (Exception e) {
			return null;
		}
	}
830407
public static String getClassName(Class<?> c) {
        String name = c.getName();
        return name.substring(name.lastIndexOf('.') + 1, name.length());
    }
73113
@NullSafe
  public static String getSimpleName(Class type) {
    return type != null ? type.getSimpleName() : null;
  }
637471
public JavaClass lookupClass(@Nonnull @DottedClassName String className) throws ClassNotFoundException {
        try {
            if (className.length() == 0) {
                throw new IllegalArgumentException("Class name is empty");
            }
            if (!ClassName.isValidClassName(className)) {
                throw new ClassNotFoundException("Invalid class name: " + className);
            }
            return Global.getAnalysisCache().getClassAnalysis(JavaClass.class,
                    DescriptorFactory.instance().getClassDescriptor(ClassName.toSlashedClassName(className)));
        } catch (CheckedAnalysisException e) {
            throw new ClassNotFoundException("Class not found: " + className, e);
        }
    }
1340909
static String getParentPackageName(final String packageOrClassName) {
        if (packageOrClassName.isEmpty()) {
            return null;
        }
        final int lastDotIdx = packageOrClassName.lastIndexOf('.');
        return lastDotIdx < 0 ? "" : packageOrClassName.substring(0, lastDotIdx);
    }
1057424
public static String getPackageName(Class<?> clazz) {
		Assert.notNull(clazz, "Class must not be null");
		return getPackageName(clazz.getName());
	}
1051956
public Class getClassForName(final String className) {
        try {
            final OsgiRegistry osgiRegistry = ReflectionHelper.getOsgiRegistryInstance();

            if (osgiRegistry != null) {
                return osgiRegistry.classForNameWithException(className);
            } else {
                return AccessController.doPrivileged(ReflectionHelper.classForNameWithExceptionPEA(className));
            }
        } catch (final ClassNotFoundException ex) {
            throw new RuntimeException(LocalizationMessages.ERROR_SCANNING_CLASS_NOT_FOUND(className), ex);
        } catch (final PrivilegedActionException pae) {
            final Throwable cause = pae.getCause();
            if (cause instanceof ClassNotFoundException) {
                throw new RuntimeException(LocalizationMessages.ERROR_SCANNING_CLASS_NOT_FOUND(className), cause);
            } else if (cause instanceof RuntimeException) {
                throw (RuntimeException) cause;
            } else {
                throw new RuntimeException(cause);
            }
        }
    }
785209
String getClassName(String name) {
        char[] s = new char[name.length()+1];
        char c;
        int j = 0;

        if (!Character.isJavaIdentifierStart(name.charAt(0))) {
            s[j++] = '_';
        }
        for (int i=0; i < name.length(); i++, j++) {
            c = name.charAt(i);
            if ( Character.isJavaIdentifierPart(c) ) {
                s[j] = c;
            } else {
                s[j] = '_';
            }
        }
        return (new String(s)).trim();
     }
1134521
public String getClassNameForEntity(String name) {
        if (name.indexOf(".") > -1)
            return getNsPackage() + "." + name;
        else
            return getPackage() + "." + name;
    }
298693
public String getFullyQualifiedNameForClassName(String className) {
    if (!classNameToFullyQualifiedName.containsKey(className)) {
      return className;
    }

    return classNameToFullyQualifiedName.get(className);
  }
581617
private Optional<String> getSuperClassName(String superName, boolean isInterface) {
        return superName != null && !isInterface ?
                Optional.of(createTypeName(superName)) :
                Optional.<String>absent();
    }