<p>
Utility method for getting the unqualified name of a {@link Class}.
</p>

@param leguminaClass
The Class to get the name from.
@return A String instance or <code>null</code>.
491981
private String getShortClassName(Class<?> leguminaClass) {
        if(leguminaClass == null) {
            return null;
        }
        String beanClassName = leguminaClass.getName();
        int lastIndex = beanClassName.lastIndexOf("."); //$NON-NLS-1$
        return (lastIndex == -1) ? beanClassName : beanClassName.substring(lastIndex + 1);
    }
3948
public static Class<?> classForNameOrNull(final String className) {
        try {
            return Class.forName(className);
        } catch (final ReflectiveOperationException | LinkageError e) {
            return null;
        }
    }
822572
public <T> T getAnnotation(Class<T> annotationClass) {
        for (Annotation annotation : m_annotations) {
            if (annotation.annotationType().equals(annotationClass)){
                return (T) annotation;
            }
        }
        return null;
    }
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);
  }
410447
public static String determineQualifiedName(String className) {

        String readableClassName = StringUtils.removeWhitespace(className);
        if (readableClassName == null) {

            throw new IllegalArgumentException("readableClassName must not be null.");

        } else if (readableClassName.endsWith("[]")) {

            StringBuilder classNameBuffer = new StringBuilder();

            while (readableClassName.endsWith("[]")) {
                readableClassName = readableClassName.substring(0, readableClassName.length() - 2);
                classNameBuffer.append("[");
            }

            String abbreviation = PRIMITIVE_MAPPING.get(readableClassName);

            if (abbreviation == null) {
                classNameBuffer.append("L").append(readableClassName).append(";");
            } else {
                classNameBuffer.append(abbreviation);
            }

            readableClassName = classNameBuffer.toString();
        }
        return readableClassName;
    }
799286
@SuppressWarnings("rawtypes")
    public static Class loadClass(String name) throws ClassNotFoundException {
        ClassLoader loader = Thread.currentThread().getContextClassLoader();
        return (loader == null) ? Class.forName(name) : loader.loadClass(name);
    }
704632
public JAnnotation getAnnotation(Class cl)
  {
    if (cl != null)
      return getAnnotation(cl.getName());
    else
      return null;
  }
419931
public ClassInfo getSuperclass() {
        final Set<ClassInfo> superClasses = relatedClasses.get(RelType.SUPERCLASSES);
        if (superClasses == null || superClasses.isEmpty()) {
            return null;
        } else if (superClasses.size() > 2) {
            throw new IllegalArgumentException("More than one superclass: " + superClasses);
        } else {
            final ClassInfo superclass = superClasses.iterator().next();
            if (superclass.getName().equals("java.lang.Object")) {
                return null;
            } else {
                return superclass;
            }
        }
    }
96634
public AnnotationInfo getAnnotationInfo(final String annotationClassName) {
        for(AnnotationInfo item : annotationInfos) {
            if(item.getClassName().equals(annotationClassName)) {
                return item;
            }
        }
        
        return null;
    }
995627
public static String getLoadableName( TypeDeclaration jclass )
    {
        TypeDeclaration containingClass = jclass.getDeclaringType();
        
        if ( containingClass == null )
        {
            return jclass.getQualifiedName();
        }
        else
        {
            return getLoadableName( containingClass ) + '$' + jclass.getSimpleName();
        }
    }
510002
@SuppressWarnings("unchecked")
	static <E, M extends BinderMapper<E>> M getMapper(Class<E> cls) {
		M mapper = (M) OBJECT_MAPPERS.get(cls);
		if (mapper == null) {
			// The only way the mapper wouldn't already be loaded into
			// OBJECT_MAPPERS is if it was compiled separately, but let's handle
			// it anyway
			String beanClassName = cls.getName();
			String mapperClassName = cls.getName() + KriptonBinder.MAPPER_CLASS_SUFFIX;
			try {
				Class<E> mapperClass = (Class<E>) Class.forName(mapperClassName);
				mapper = (M) mapperClass.newInstance();
				// mapper.
				OBJECT_MAPPERS.put(cls, mapper);
			} catch (ClassNotFoundException e) {
				e.printStackTrace();
				throw new KriptonRuntimeException(String.format("Class '%s' does not exist. Does '%s' have @BindType annotation?", mapperClassName, beanClassName));
			} catch (InstantiationException e) {
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
		return mapper;
	}
454745
public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
        Objects.requireNonNull(annotationClass);
        T[] annotations = getAnnotationsByType(annotationClass);
        return annotations.length > 0 ? annotations[0] : null;
    }
600454
public String getTeaFullClassName(Class<?> clazz) {

        if (isImplicitTeaImport(clazz)) {
            return getClassName(clazz);
        }
        
        return getFullClassName(clazz);
    }
19892
public PropertyNameProcessor findJavaPropertyNameProcessor( Class beanClass ) {
      if( !javaPropertyNameProcessorMap.isEmpty() ) {
         Object key = javaPropertyNameProcessorMatcher.getMatch( beanClass, javaPropertyNameProcessorMap.keySet() );
         return (PropertyNameProcessor) javaPropertyNameProcessorMap.get( key );

      }
      return null;
   }
36504
public static String soyTemplateNameFromJavaClassName(String javaClass) {
    if (!javaClass.startsWith(CLASS_PREFIX)) {
      throw new IllegalArgumentException(
          "java class: " + javaClass + " is not a mangled soy template name");
    }
    return javaClass.substring(CLASS_PREFIX.length());
  }
552549
@Override
    public final Class<?> getColumnClass(int columnIndex) {
        Column column = getColumn(columnIndex);
        if (column == Column.CUSTOM) {
            return getCustomColumnClass(columnIndex);
        }
        return getColumnClass(column);
    }
740945
public static String getScriptName(Class<?> clazz) {
        return clazz == null ? null : getScriptName(clazz.getName());
    }