/** checks if the any contains an interface, struct, exception, sequence or enum. If <em>object</em> is an any with an interface type, then true is also returned if the any contains a null reference. This is because interfaces are allowed to have a null value contrary to other UNO types. @param object the object to check @return true if the any contains an object */ static public boolean isObject(Object object) { int tc = getType(object).getTypeClass().getValue(); return (TypeClass.INTERFACE_value == tc || TypeClass.STRUCT_value == tc || TypeClass.EXCEPTION_value == tc || TypeClass.SEQUENCE_value == tc || TypeClass.ENUM_value == tc); }
/** * Checks if the any contains an interface, struct, exception, sequence or enum. * * <p>If <em>object</em> is an any with an interface type, then true is also * returned if the any contains a null reference. This is because interfaces * are allowed to have a null value contrary to other UNO types.</p> * * @param object the object to check. * @return true if the any contains an object. */ public static boolean isObject(Object object) { int tc = getType(object).getTypeClass().getValue(); return (TypeClass.INTERFACE_value == tc || TypeClass.STRUCT_value == tc || TypeClass.EXCEPTION_value == tc || TypeClass.SEQUENCE_value == tc || TypeClass.ENUM_value == tc); }
/** Examines the argument <em>object</em> if is correspond to the type in argument <em>what</em>. <em>object</em> is either matched directly against the type or if it is an any then the contained object is matched against the type. */ static private boolean containsType( TypeClass what, Object object){ return (getType(object).getTypeClass().getValue() == what.getValue()); }
/** * Examines the argument <em>object</em> if is correspond to the type in * argument <em>what</em>. * * <p><em>object</em> is either matched directly against the type or if it is * an any then the contained object is matched against the type.</p> */ private static boolean containsType( TypeClass what, Object object){ return (getType(object).getTypeClass().getValue() == what.getValue()); }
/** Determines the type of an any object. @param object any object @return type object */ static public Type getType( Object object ) { Type t; if (null == object) { t = m_XInterface_type; } else if (object instanceof Any) { t = ((Any)object).getType(); // nested any if (TypeClass.ANY_value == t.getTypeClass().getValue()) return getType( ((Any)object).getObject() ); } else { t = new Type( object.getClass() ); } return t; }
/** * Determines the type of an any object. * * @param object any object. * @return type object. */ public static Type getType( Object object ) { Type t; if (null == object) { t = m_XInterface_type; } else if (object instanceof Any) { t = ((Any)object).getType(); // nested any if (TypeClass.ANY_value == t.getTypeClass().getValue()) return getType( ((Any)object).getObject() ); } else { t = new Type( object.getClass() ); } return t; }
AnyConverter.getType(e.TargetException)) && (p.property.Attributes & PropertyAttribute.OPTIONAL) != 0) boolean isDefaulted = false; while (undoAmbiguous || undoDefaulted || undoOptional) { String typeName = AnyConverter.getType(value).getTypeName(); if (undoAmbiguous && typeName.startsWith("com.sun.star.beans.Ambiguous<"))
AnyConverter.getType(e.TargetException)) && (p.property.Attributes & PropertyAttribute.OPTIONAL) != 0) boolean isDefaulted = false; while (undoAmbiguous || undoDefaulted || undoOptional) { String typeName = AnyConverter.getType(value).getTypeName(); if (undoAmbiguous && typeName.startsWith("com.sun.star.beans.Ambiguous<"))