/** * Constructs a new any. * <p> * @param zInterface the type of the any. * @param object the data of the any. * @deprecated as of UDK 2.0 */ public Any(Class zInterface, Object object) { this(new Type(zInterface), object); }
/** * Constructs a new any. * * @param zInterface the type of the any. * @param object the data of the any. * @deprecated as of UDK 2.0 */ public Any(Class<?> zInterface, Object object) { this(new Type(zInterface), object); }
/** * Provides the UNO type of the <code>ServiceManager</code> * * @return the UNO type of the <code>ServiceManager</code>. * @see com.sun.star.container.XElementAccess * @see com.sun.star.uno.TypeClass */ public com.sun.star.uno.Type getElementType() throws com.sun.star.uno.RuntimeException { if ( UNO_TYPE == null ) UNO_TYPE = new com.sun.star.uno.Type(ServiceManager.class); return UNO_TYPE; }
public static Any createAny(Object o) { return new Any(new Type(o.getClass()), o); } }
public static Any createAny(Object o) { return new Any(new Type(o.getClass()), o); } }
/** * Complete a UNO <code>ANY</code> (make sure it is wrapped up as an * <code>Any</code> instance). * * @param any a Java value representing a UNO <code>ANY</code> value. * @return a complete Java value (that is, an <code>Any</code> instance) * representing the same UNO <code>ANY</code> value as the given argument. * @since UDK 3.2.3 */ public static final Any complete(Object any) { return any instanceof Any ? (Any) any : new Any( new Type(any == null ? XInterface.class : any.getClass()), any); }
/** Complete a UNO <code>ANY</code> (make sure it is wrapped up as an <code>Any</code> instance). @param any a Java value representing a UNO <code>ANY</code> value. @return a complete Java value (that is, an <code>Any</code> instance) representing the same UNO <code>ANY</code> value as the given argument. @since UDK 3.2.3 */ public static final Any complete(Object any) { return any instanceof Any ? (Any) any : new Any( new Type(any == null ? XInterface.class : any.getClass()), any); }
public static TypeDescription getTypeDescription(String typeName) throws ClassNotFoundException { Type t = new Type(typeName); if (t.getTypeClass() == TypeClass.UNKNOWN) { if (typeName.startsWith("[]")) { t = new Type(typeName, TypeClass.SEQUENCE); } else { t = new Type(Class.forName(typeName)); } } return get(t); }
public static TypeDescription getTypeDescription(String typeName) throws ClassNotFoundException { Type t = new Type(typeName); if (t.getTypeClass() == TypeClass.UNKNOWN) { if (typeName.startsWith("[]")) { t = new Type(typeName, TypeClass.SEQUENCE); } else { t = new Type(Class.forName(typeName)); } } return get(t); }
/** * * @see com.sun.star.bridge.XBridge#getInstance */ public Object getInstance(String instanceName) { Type t = new Type(XInterface.class); return sendInternalRequest( instanceName, t, "queryInterface", new Object[] { t }); }
public Object getInstance(String instanceName) { Type t = new Type(XInterface.class); return sendInternalRequest( instanceName, t, "queryInterface", new Object[] { t }); }
private Object readInterfaceValue(TypeDescription type) { return readInterface(new Type(type)); }
private void writeInterfaceValue(TypeDescription type, XInterface value) { writeInterface(value, new Type(type)); }
private void writeInterfaceValue(TypeDescription type, XInterface value) { writeInterface(value, new Type(type)); }
private static TypeDescription getTypeDescription( Class<?> zClass, TypeInfo typeInfo) { return getDefinitely( new Type( zClass, typeInfo != null && (typeInfo.isUnsigned() || typeInfo.isInterface()))); }
private static ITypeDescription getTypeDescription( Class zClass, TypeInfo typeInfo) { return getDefinitely( new Type( zClass, typeInfo != null && (typeInfo.isUnsigned() || typeInfo.isInterface()))); }
public static TypeDescription getTypeDescription(Type type) throws ClassNotFoundException { //TODO: synchronize on type? TypeDescription desc = type.getTypeDescription(); if (desc == null) { desc = getTypeDescription(type.getTypeName()); type.setTypeDescription(desc); } return desc; }
public static TypeDescription getTypeDescription(Type type) throws ClassNotFoundException { //TODO: synchronize on type? TypeDescription desc = (TypeDescription) type.getTypeDescription(); if (desc == null) { desc = getTypeDescription(type.getTypeName()); type.setTypeDescription(desc); } return desc; }