Get the Class type of the specified Object.  Returns null if the Object reference is null.

@param obj the Object who's Class type is being determined.
@return a Class object signifying the type of the specified Object.
@see java.lang.Object#getClass()
189592
@NullSafe
  public static Class<?> getClass(Object obj) {
    return obj != null ? obj.getClass() : null;
  }
671020
@SuppressWarnings("unchecked")
        public static <T> ClassSup<T> cls(T obj) {
                return mapper.get(obj.getClass().getName(), () -> (ClassSup<T>) cls(obj.getClass()));
        }
277607
function gettype(obj) {
  var type = typeof obj;

  if (type !== 'object') {
    return type;
  }

  // inspect [[Class]] for objects
  return toString.call(obj)
    .replace(objectRegExp, '$1');
}
737748
@CheckForNull
    public static JavaClass getOuterClass(JavaClass obj) throws ClassNotFoundException {
        for (Attribute a : obj.getAttributes()) {
            if (a instanceof InnerClasses) {
                for (InnerClass ic : ((InnerClasses) a).getInnerClasses()) {
                    if (obj.getClassNameIndex() == ic.getInnerClassIndex()) {
                        // System.out.println("Outer class is " +
                        // ic.getOuterClassIndex());
                        ConstantClass oc = (ConstantClass) obj.getConstantPool().getConstant(ic.getOuterClassIndex());
                        String ocName = oc.getBytes(obj.getConstantPool());
                        return Repository.lookupClass(ocName);
                    }
                }
            }
        }
        return null;
    }
1276898
public static Class getTypeClass(Type type)
    {
        Class typeClassClass = null;

        if (type instanceof Class) {
            typeClassClass = (Class) type;
        } else if (type instanceof ParameterizedType) {
            typeClassClass = (Class) ((ParameterizedType) type).getRawType();
        } else if (type instanceof GenericArrayType) {
            Class<?> arrrayParameter = getTypeClass(((GenericArrayType) type).getGenericComponentType());
            if (arrrayParameter != null) {
                typeClassClass = Array.newInstance(arrrayParameter, 0).getClass();
            }
        }

        return typeClassClass;
    }
1341068
public static String getStringFor(String name, Object obj)
	{
		if(obj == null)
			throw new NullPointerException("obj is null");
		return getStringFor(name,obj.getClass());
	}
6300
public static String getXSIType(Object obj) {
        Class<?> type = obj.getClass();

        for (int i = 0; i < clazzes.length; i++) {
            if (type == clazzes[i]) {
                return xsdStrs[i];
            }
        }

        if (obj instanceof java.util.Calendar) {
            return "xsd:dateTime";
        }

        throw new RuntimeException("Unknown data type during serialization:" + type);
    }
1153675
public static Class<?> getType(Object object) {
        Class<?> type = null;
        if (isClass(object)) {
            type = (Class<?>) object;
        } else if (object != null) {
            type = object.getClass();
        }
        return type;
    }
387057
private static Class getClassForClassNode(ClassNode type) {
        // todo hamlet - move to a different "InferenceUtil" object
        Class primitiveType = getPrimitiveType(type);
        if (primitiveType != null) {
            return primitiveType;
        } else if (classNodeImplementsType(type, String.class)) {
            return String.class;
        } else if (classNodeImplementsType(type, ReentrantLock.class)) {
            return ReentrantLock.class;
        } else if (type.getName() != null && type.getName().endsWith("[]")) {
            return Object[].class;       // better type inference could be done, but oh well
        }
        return null;
    }
261576
@Override
	public long getObjectClass(long oid) {
		FilePos oie = oidIndex.findOid(oid);
		if (oie == null) {
			throw DBLogger.newObjectNotFoundException("OID not found: " + Util.oidToString(oid));
		}
		
		try {
			fileInAP.seekPage(PAGE_TYPE.DATA, oie.getPage(), oie.getOffs());
			return DataDeSerializerNoClass.getClassOid(fileInAP);
		} catch (Exception e) {
			throw DBLogger.newObjectNotFoundException(
					"ERROR reading object: " + Util.oidToString(oid));
		}
	}
478902
public JClass getSuperClass()
  {
    Class cl = _class.getSuperclass();

    if (cl != null)
      return _loader.forName(cl.getName());
    else
      return null;
  }
510212
public static boolean isExpectedType(final Class<?> expectedClass, final Object obj) {
        final Class<?> actualClass;
        if (obj == null) {
            actualClass = null;
        } else {
            actualClass = obj.getClass();
        }
        return Objects.equals(expectedClass, actualClass);
    }
1362658
protected String get_object_type()
	{
		String name = this.getClass().getName();
		int index = name.lastIndexOf(".");
		if(index > 0)
			name = name.substring(index+1);
		index = name.lastIndexOf("_stats");
		if (index > 0) {	
			name = name.substring(0, index);
		}
		return name;
	}
239825
@Override
  public Object get(Object obj) {
    String key = this.keyOf(obj);
    return this.getByKey(key);
  }
33501
public static Object getProperty(Object obj, String name) {
		if (obj == null)
			throw new NullPointerException("Object cannot be null");
		if (name == null)
			throw new NullPointerException("Property name cannot be null");

		Class<?> objClass = obj.getClass();

		// Search in fields
		for (Field field : objClass.getFields()) {
			try {
				if (matchField(field, name))
					return field.get(obj);
			} catch (Throwable t) {
				// Ignore exceptions
			}
		}

		// Search in properties
		name = "get" + name;
		for (Method method : objClass.getMethods()) {
			try {
				if (matchPropertyGetter(method, name))
					return method.invoke(obj);
			} catch (Throwable t) {
				// Ignore exceptions
			}
		}

		return null;
	}
1002539
public static RC5CBCParameter getInstance(Object obj)
    {
        if (obj instanceof RC5CBCParameter) {
            return (RC5CBCParameter) obj;
        }
        if (obj != null) {
            return new RC5CBCParameter(ASN1Sequence.getInstance(obj));
        }
        return null;
    }
927204
public static Class<?> getUserClass(Object instance) {
		Assert.notNull(instance, "Instance must not be null");
		return getUserClass(instance.getClass());
	}