Examples of ITypeDescription


Examples of com.sun.star.uno.ITypeDescription

    return result;
  }


  private Object []readParams(IMethodDescription iMethodDescription) {
    ITypeDescription in_sig[] = iMethodDescription.getInSignature();
    ITypeDescription out_sig[] = iMethodDescription.getOutSignature();

    Object params[] = new Object[in_sig.length];
   
    for(int i = 0; i < params.length; ++ i) {
      if(in_sig[i] != null) // is it an in parameter?
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

        _marshal.writebyte((byte)(iMethodDescription.getIndex() & 0xff));
      }
    }
   
    // write the in parameters
    ITypeDescription in_sig[] = iMethodDescription.getInSignature();
    ITypeDescription out_sig[] = iMethodDescription.getOutSignature();
    for(int i = 0; i < in_sig.length; ++ i) {
      if(in_sig[i] != null) { // is it an in parameter?
        if(out_sig[i] != null// is it also an out parameter?
          _marshal.writeObject(out_sig[i].getComponentType(), ((Object [])params[i])[0]);
        else // in only
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

    ++ _message_count;

    Object objects[] = (Object[])removePendingReply(threadId);
    Object params[] = (Object[])objects[0];
    ITypeDescription signature[] = (ITypeDescription[])objects[1];
    ITypeDescription resType     = (ITypeDescription)objects[2];
   
    byte header = BIG_HEADER; // big header
   
    if(exception) { // has an exception occurred?
      header |= EXCEPTION;
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

   
    @param typeName name of a type for which an TypeDescription  object
    is constructed whoose information are printed.
   */
  static public void dumpTypeDescription(String typeName) throws Exception {
    ITypeDescription iTypeDescription = TypeDescription.getTypeDescription(typeName);

    System.err.println("TypeName:" + iTypeDescription.getTypeName());
    System.err.println("ArrayTypeName:" + iTypeDescription.getArrayTypeName());
    System.err.println("SuperType:" + iTypeDescription.getSuperType());
    System.err.println("TypeClass:" + iTypeDescription.getTypeClass());
    System.err.println("ComponentType:" + iTypeDescription.getComponentType());
    System.err.println("Class:" + iTypeDescription.getZClass());
   
    System.err.println("Methods:");
    IMethodDescription iMethodDescriptions[] = iTypeDescription.getMethodDescriptions();
    if(iMethodDescriptions != null)
      for(int i = 0; i < iMethodDescriptions.length; ++ i) {
        System.err.print("Name: " + iMethodDescriptions[i].getName());
        System.err.print(" index: " + iMethodDescriptions[i].getIndex());
        System.err.print(" isOneyWay: " + iMethodDescriptions[i].isOneway());
//          System.err.print(" isConst: " + iMethodDescriptions[i].isConst());
        System.err.print(" isUnsigned: " + iMethodDescriptions[i].isUnsigned());
        System.err.print(" isAny: " + iMethodDescriptions[i].isAny());
        System.err.println("\tisInterface: " + iMethodDescriptions[i].isInterface());

        System.err.print("\tgetInSignature: ");
        ITypeDescription in_sig[] = iMethodDescriptions[i].getInSignature();
        for(int j = 0; j < in_sig.length; ++ j)
          System.err.print("\t\t" + in_sig[j]);
        System.err.println();

        System.err.print("\tgetOutSignature: ");
        ITypeDescription out_sig[] = iMethodDescriptions[i].getOutSignature();
        for(int j = 0; j < out_sig.length; ++ j)
          System.err.print("\t\t" + out_sig[j]);
        System.err.println();

        System.err.println("\tgetReturnSig: " + iMethodDescriptions[i].getReturnSignature());
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

   * @param     oId         the oid of the proxy.
   * @param     type  the interface the proxy should implement
   * @param     virtual    determines if the proxy should be virtual, e.g. does not send a release
   */
    static public Object create(IRequester requester, String oId, Type type, boolean virtual, boolean forceSynchronouse) {
    ITypeDescription iTypeDescription = null;

    try {
      iTypeDescription = TypeDescription.getTypeDescription(type);
    }
    catch(ClassNotFoundException classNotFoundException) {
      throw new com.sun.star.uno.RuntimeException(Proxy.class.getName() + ".create - couldn't get type - " + classNotFoundException);
    }

      Class dispatcherClass = DispatcherAdapterFactory.createDispatcherAdapter(iTypeDescription.getZClass(), "com/sun/star/lib/uno/environments/java/Proxy");

      Proxy javaProxy;

    try {
      javaProxy = (Proxy)dispatcherClass.newInstance();
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

  }

  void writeAny(Object object) {
    if(DEBUG) System.err.println("##### " + getClass().getName() + ".writeAny:" + object);

    ITypeDescription iTypeDescription = null;

    if(object == null)
      iTypeDescription = __xInterfaceTypeDescription;

    else if(object instanceof Any) {
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

    _inputStream          = new ByteArrayInputStream(new byte[0]);
    _dataInput            = new DataInputStream(_inputStream);
  }

  Object readAny() {
    ITypeDescription iTypeDescription = readTypeDescription();
    Object object = readObject(iTypeDescription);

    // the object can only be null, if the return is an void-any or null interface
    // cause java does not know a "void value", we create a special any
    if(object == null && iTypeDescription.getZClass() == void.class)
      object = new Any(new Type(iTypeDescription), null);

    if(DEBUG) System.err.println("##### " + getClass().getName() + ".readAny:" + object);

    return object;
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

  ITypeDescription readTypeDescription() {
    int typeClassValue = readunsignedbyte() & 0xff;

    TypeClass typeClass = TypeClass.fromInt(typeClassValue & 0x7f);
    ITypeDescription iTypeDescription = null;

    if(TypeDescription.isTypeClassSimple(typeClass)) // is it a simple type?
      iTypeDescription = TypeDescription.getTypeDescription(typeClass);

    else {
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

    return typeDescription;
  }

  static public ITypeDescription getTypeDescription(Type type) throws ClassNotFoundException {
    ITypeDescription iTypeDescription = type.getTypeDescription();

    if(iTypeDescription == null) {
      if(type.getZClass() != null)
        iTypeDescription = getTypeDescription(type.getZClass());
       
View Full Code Here

Examples of com.sun.star.uno.ITypeDescription

   * this is an array type.
   * <p>
   * @return the <code>TypeDescription</code>
   */
  public ITypeDescription getComponentType() {
    ITypeDescription iTypeDescription = null;

    Class componentClass = getZClass().getComponentType();
    if(componentClass != null)
      iTypeDescription = getTypeDescription(componentClass);

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.