Find an order value indicated by the given object.
<p>The default implementation checks against the {@link Ordered} interface.
Can be overridden in subclasses.
@param obj the object to check
@return the order value, or {@code null} if none found
8485
protected Integer findOrder(Object obj) {
		return (obj instanceof Ordered ? ((Ordered) obj).getOrder() : null);
	}
987564
public static ASN1Set getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof ASN1Set)
        {
            return (ASN1Set)obj;
        }

        throw new IllegalArgumentException("unknown object in getInstance");
    }
425867
public String getAlias(Object obj) {
        if (obj == null)
            return null;

        return getClassAlias(obj.getClass());
    }
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;
    }
1104477
public static boolean isValued(Object obj) {
		if (obj == null) return false;
		if (obj instanceof String) return isStringValued((String) obj);
		return true;
	}
1185664
public static String getClassName(Object obj) {
        String className = obj.getClass().getName();
        className = className.substring(className.lastIndexOf('.') + 1);
        return className;
    }
1249394
public int compareTo(CmsJspNavElement obj) {

        if (obj == this) {
            return 0;
        }
        float pos = obj.getNavPosition();
        // please note: can't just subtract and cast to int here because of float precision loss
        if (m_position == pos) {
            return 0;
        }
        return (m_position < pos) ? -1 : 1;
    }
691901
@Override
    public int compareTo(Object obj) {
        if (!this.trusted)
            checkValidity();
        final ByteBuffer other = ((WsByteBuffer) obj).getWrappedByteBufferNonSafe();
        return this.oByteBuffer.compareTo(other);
    }
643437
public static Object getFieldValue(Object obj, String name) {
        Class<?> clazz = obj.getClass();
        try {
            Field f = clazz.getDeclaredField(name);
            return f.get(obj);
        }
        catch (Exception e) {
            return null;
        }
    }
63782
@Override
  @SuppressWarnings("unchecked")
  public <E> Comparator<E> getOrderBy() {
    return ObjectUtils.defaultIfNull(ComparatorHolder.get(), ObjectUtils.defaultIfNull(
      orderBy, ComparableComparator.INSTANCE));
  }
622773
public static Class<?> getClass(Object obj) {
		Class<?> cls = obj.getClass();
		return cls != Class.class ? cls : (Class<?>) obj;
	}
1095124
public static DERUTCTime getInstance(
        Object  obj)
    {
        if (obj == null || obj instanceof DERUTCTime)
        {
            return (DERUTCTime)obj;
        }

        if (obj instanceof ASN1OctetString)
        {
            return new DERUTCTime(((ASN1OctetString)obj).getOctets());
        }

        throw new IllegalArgumentException("illegal object in getInstance: " + obj.getClass().getName());
    }
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);
    }
259608
public <FV> FV getFieldValueIfNotDefault(Object object) throws SQLException {
		@SuppressWarnings("unchecked")
		FV fieldValue = (FV) extractJavaFieldValue(object);
		if (isFieldValueDefault(fieldValue)) {
			return null;
		} else {
			return fieldValue;
		}
	}
1122671
public boolean evaluate(Object obj) {
        if(obj == null) {
            return true;
        }
        boolean result = false;
        if(obj instanceof String) {
            result = !Boolean.parseBoolean((String)obj);
        } else if(ComponentUtils.isNumeric(obj)) {
            result = ((Number)obj).intValue() == 0; 
        } else if(obj instanceof Boolean) {
            result = !((Boolean)obj).booleanValue();
        } else {
            throw new Siren4JRuntimeException(
                "Unsupported value type for 'FALSE' condition: " + obj.getClass().getName());  
        }
        return result;
    }
849120
public String getNameByReflection(Object obj)
    {
        Object name = null;
        try {
            java.lang.reflect.Method method = obj.getClass().getMethod("getName");
            
            if (method != null)
                name = method.invoke(obj);
        } catch (Exception e) {
            e.printStackTrace();
        }
        if (name == null)
            return null;
        else
            return name.toString();
    }
32535
public static <T extends Object> T getFieldValue(Object obj, String fieldName) {
        Assert.notNull(obj, "obj不能为空");
        Assert.notNull(fieldName, "fieldName不能为空");

        Field field;
        if (obj instanceof Class) {
            field = getField((Class) obj, fieldName);
        } else {
            field = getField(obj.getClass(), fieldName);
        }

        return getFieldValue(obj, field);
    }