Package com.sun.star.reflection

Examples of com.sun.star.reflection.XTypeDescription


            String sCentralVariableStemName = "";
            int nTypeClass = _aTypeClass.getValue();
            switch(nTypeClass){
                case TypeClass.SEQUENCE_value:
                    //TODO consider mulitdimensional Arrays
                    XTypeDescription xTypeDescription = Introspector.getIntrospector().getReferencedType(getTypeName());
                    if (xTypeDescription != null){
                        sCentralVariableStemName = getCentralVariableStemName(xTypeDescription.getTypeClass());
                    }
                    break;               
                case TypeClass.TYPE_value:
                    sCentralVariableStemName = SVARIABLENAME;
                    break;
View Full Code Here


                case TypeClass.STRING_value:
                    sVariableStemName = "s" + m_sCentralVariableStemName;
                    break;                               
                case TypeClass.SEQUENCE_value:
                    //TODO consider mulitdimensional Arrays
                    XTypeDescription xTypeDescription = Introspector.getIntrospector().getReferencedType(getTypeName());
                    if (xTypeDescription != null){
                        sVariableStemName = getVariableStemName(xTypeDescription.getTypeClass());
                    }
                    break;               
                case TypeClass.TYPE_value:
                    sVariableStemName = "a" + m_sCentralVariableStemName;
                    break;
View Full Code Here

            String sClassName = _sClassName;
            String sHeaderStatement = "";
            if (_oUnoObject != null){
                if (!m_oIntrospector.isObjectPrimitive(_oUnoObject)){           
                    if (m_oIntrospector.isObjectSequence(_oUnoObject)){
                        XTypeDescription xTypeDescription = m_oIntrospector.getReferencedType(sClassName);
                        if (xTypeDescription != null){
                            if (!m_oIntrospector.isPrimitive(xTypeDescription.getTypeClass())){
                                sClassName = getTypeString(xTypeDescription.getName(), xTypeDescription.getTypeClass(), true);  
                            }
                            // primitive Types are not supposed to turn up in the import section...
                            else{
                                sClassName = "";
                            }
View Full Code Here

                        oObj.createTypeDescriptionEnumeration(sString, tClass,
                        TypeDescriptionSearchDepth.INFINITE);
            try {
                log.println("Got an enumeration.");
                while (true) {
                    XTypeDescription desc = oEnum.nextTypeDescription();
                    i++;
                    log.println("\tdesc name: " + desc.getName());
                }
            }
            catch(com.sun.star.container.NoSuchElementException e) {
                log.println(
                        "Correct exception caught for exiting enumeration.");
View Full Code Here

                        oObj.createTypeDescriptionEnumeration(sString, tClass,
                        TypeDescriptionSearchDepth.INFINITE);
            try {
                log.println("Got an enumeration.");
                while (true) {
                    XTypeDescription desc = oEnum.nextTypeDescription();
                    i++;
                    log.println("\tdesc name: " + desc.getName());
                }
            }
            catch(com.sun.star.container.NoSuchElementException e) {
                log.println(
                        "Correct exception caught for exiting enumeration.");
View Full Code Here

        this.context = context;
        this.object = object;
        this.type = type;
        this.absentOptional = absentOptional;
        idlClass = getReflection(type.getTypeName());
        XTypeDescription ifc;
        try {
            ifc = UnoRuntime.queryInterface(
                XTypeDescription.class,
                (UnoRuntime.queryInterface(
                    XHierarchicalNameAccess.class,
View Full Code Here

                        }
                    }
                    if (getUnknown && setUnknown) {
                        attrAttribs |= PropertyAttribute.OPTIONAL;
                    }
                    XTypeDescription t = attr.getType();
                    for (;;) {
                        t = resolveTypedefs(t);
                        short n;
                        if (t.getName().startsWith(
                                "com.sun.star.beans.Ambiguous<"))
                        {
                            n = PropertyAttribute.MAYBEAMBIGUOUS;
                        } else if (t.getName().startsWith(
                                       "com.sun.star.beans.Defaulted<"))
                        {
                            n = PropertyAttribute.MAYBEDEFAULT;
                        } else if (t.getName().startsWith(
                                       "com.sun.star.beans.Optional<"))
                        {
                            n = PropertyAttribute.MAYBEVOID;
                        } else {
                            break;
                        }
                        attrAttribs |= n;
                        t = (UnoRuntime.queryInterface(
                                 XStructTypeDescription.class, t)).
                            getTypeArguments()[0];
                    }
                    String name = members[i].getMemberName();
                    boolean present = true;
                    if (absentOptional != null) {
                        for (int j = 0; j < absentOptional.length; ++j) {
                            if (name.equals(absentOptional[j])) {
                                present = false;
                                break;
                            }
                        }
                    }
                    if (map.put(
                            name,
                            new PropertyData(
                                new Property(
                                    name, handleNames.size(),
                                    new Type(t.getName(), t.getTypeClass()),
                                    attrAttribs),
                                present))
                        != null)
                    {
                        throw new RuntimeException(
View Full Code Here

      for ( int i = 0; i < nMethods; ++i )
      {
        AttributeTypeInfo m = isAttributeMethod( methods[i] );
        if (m != null)
        {
          XTypeDescription returnType = (XTypeDescription)_tdmanager.getByClass(
            methods[i].getReturnType(), m.isUnsigned(), m.isInterface() );
          if (! m.isReadOnly())
            ++i;
         
          String memberName = methods[i].getName().substring(3);
View Full Code Here

        bUnsigned = paramInfo.isUnsigned();
        bIsInterface = paramInfo.isInterface();
      }
     
      Class c = parameters[i];
      XTypeDescription xParamType = (XTypeDescription)_tdmanager.getByClass(
        ((bOut && c.isArray()) ? c.getComponentType() : c), bUnsigned, bIsInterface );
     
      params[i] = new MethodParameter( "Parameter "+i, xParamType, i, bIn, bOut );
    }
   
View Full Code Here

  //______________________________________________________________________________________________
  public XInterfaceTD( XHierarchicalNameAccess xAccess )
    throws NoSuchElementException
  {
    XTypeDescription xVoidTD = (XTypeDescription)xAccess.getByHierarchicalName( "void" );
    XTypeDescription[] rt = new XTypeDescription[] {
      (XTypeDescription)xAccess.getByHierarchicalName( "com.sun.star.uno.RuntimeException" ) };
   
    _members = new XInterfaceMemberTypeDescription[3];
View Full Code Here

TOP

Related Classes of com.sun.star.reflection.XTypeDescription

Copyright © 2018 www.massapicom. 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.