Examples of XIdlMethod


Examples of com.sun.star.reflection.XIdlMethod

                    oRetComponentsVector.add(xEnumeration.nextElement());
                }
            }
            XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
            if ( xIndexAccess != null ) {
                XIdlMethod mMethod = xIntrospectionAccessObject.getMethod("getByIndex", com.sun.star.beans.MethodConcept.INDEXCONTAINER);
                for ( int i = 0; i < xIndexAccess.getCount(); i++ ) {
                    Object[][] aParamInfo = new Object[1][1];
                    aParamInfo[0] = new Integer[] { new Integer(i) };
                    oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo));
                }
            }
        }
        if (oRetComponentsVector != null){
            oRetComponents = new Object[oRetComponentsVector.size()];
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

       
       
        public void addMethodsToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoParentObject, XIdlMethod[] _xIdlMethods){
            if (this.m_oIntrospector.isValid(_xIdlMethods)){
                for ( int n = 0; n < _xIdlMethods.length; n++ ) {
                    XIdlMethod xIdlMethod = _xIdlMethods[n];
                    if (!xIdlMethod.getDeclaringClass().getName().equals("com.sun.star.uno.XInterface")){
                        XUnoMethodNode oChildNode = addMethodNode(_oUnoParentObject, xIdlMethod);
                        if (oChildNode != null){
                            _oGrandParentNode.addChildNode(oChildNode);
                        }
                    }
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

   
   
    public String getMethodStatementSourceCode(XUnoMethodNode _oUnoMethodNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){
        String sReturnObjectVariableDefinition = "";
        String sStatement = "";
        XIdlMethod xIdlMethod = _oUnoMethodNode.getXIdlMethod();
        TypeClass aReturnTypeClass = xIdlMethod.getReturnType().getTypeClass();
        UnoObjectDefinition oUnoObjectDefinition = new UnoObjectDefinition(_oUnoMethodNode.getUnoObject(), _oUnoMethodNode.getClassName());
        if (!isVariableDeclared(oUnoObjectDefinition)){
            String sObjectVariableDefinition = getVariableDeclaration(oUnoObjectDefinition);
            String sShortClassName = getShortClassName(oUnoObjectDefinition.getTypeName());
            sStatement = m_xLanguageSourceCodeGenerator.getqueryInterfaceSourceCode(sShortClassName, sObjectVariableDefinition, _sVariableName);
        }
        Object[] oParamObjects = _oUnoReturnObjectDefinition.getParameterObjects();
        String sParameterCode = getMethodParameterValueDescription(_oUnoMethodNode, oParamObjects, false);
        if (_oUnoReturnObjectDefinition.getTypeClass().getValue() != TypeClass.VOID_value){
            sReturnObjectVariableDefinition = getVariableInitialization(_oUnoReturnObjectDefinition) + " = ";
        }
        sStatement += "\t" + sReturnObjectVariableDefinition + oUnoObjectDefinition.getVariableName() + "." + xIdlMethod.getName() + "(" + sParameterCode + ");";
        return sStatement;
    }
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

                                    int intEnd = stringNode.indexOf( " (" );
                                    String stringMethod = stringNode.substring( intBegin, intEnd );
                                   
                                    Object objectGrandParent = hashtableObjects.get( treePath.getParentPath().getParentPath().toString() );
                                    XIntrospectionAccess xIntrospectionAccess = xIntrospection.inspect( objectGrandParent );
                                    XIdlMethod xIdlMethod = xIntrospectionAccess.getMethod( stringMethod, com.sun.star.beans.MethodConcept.ALL );
                                    String stringDeclaringClass = xIdlMethod.getDeclaringClass().getName().replace( '.', '/' );
                                   
                                    stringURLDocument = stringDeclaringClass + ".html#" + stringMethod;
                                }
                                else if ( ( stringParentNode.equals( "Services" )
                                || ( stringParentNode.equals( "Interfaces" ) ) ) ) {
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

       
       
        public void addMethodsToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoParentObject, XIdlMethod[] _xIdlMethods){
            if (this.m_oIntrospector.isValid(_xIdlMethods)){
                for ( int n = 0; n < _xIdlMethods.length; n++ ) {
                    XIdlMethod xIdlMethod = _xIdlMethods[n];
                    if (!xIdlMethod.getDeclaringClass().getName().equals("com.sun.star.uno.XInterface")){
                        XUnoMethodNode oChildNode = addMethodNode(_oUnoParentObject, xIdlMethod);
                        if (oChildNode != null){
                            _oGrandParentNode.addChildNode(oChildNode);
                        }
                    }
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

                    oRetComponentsVector.add(xEnumeration.nextElement());
                }
            }
            XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
            if ( xIndexAccess != null ) {
                XIdlMethod mMethod = xIntrospectionAccessObject.getMethod("getByIndex", com.sun.star.beans.MethodConcept.INDEXCONTAINER);
                for ( int i = 0; i < xIndexAccess.getCount(); i++ ) {
                    Object[][] aParamInfo = new Object[1][1];
                    aParamInfo[0] = new Integer[] { new Integer(i) };
                    oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo));
                }
            }
        }
        if (oRetComponentsVector != null){
            oRetComponents = new Object[oRetComponentsVector.size()];
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

   
   
    public String getMethodStatementSourceCode(XUnoMethodNode _oUnoMethodNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){
        String sReturnObjectVariableDefinition = "";
        String sStatement = "";
        XIdlMethod xIdlMethod = _oUnoMethodNode.getXIdlMethod();
        TypeClass aReturnTypeClass = xIdlMethod.getReturnType().getTypeClass();
        UnoObjectDefinition oUnoObjectDefinition = new UnoObjectDefinition(_oUnoMethodNode.getUnoObject(), _oUnoMethodNode.getClassName());
        String sVariableStemName = this.generateVariableNameFromMethod(xIdlMethod);
        sStatement += addQueryInterfaceSourceCode(oUnoObjectDefinition, _sVariableName, oUnoObjectDefinition.getTypeName());
        if (_oUnoReturnObjectDefinition.getTypeClass().getValue() != TypeClass.VOID_value){
            sReturnObjectVariableDefinition = getVariableInitialization(_oUnoReturnObjectDefinition, false) + " = ";
        }
        Object[] oParamObjects = _oUnoReturnObjectDefinition.getParameterObjects();
        String sParameterCode = getMethodParameterValueDescription(_oUnoMethodNode, oParamObjects, false);
        String sSeparator = m_xLanguageSourceCodeGenerator.getMethodSeparator();
        sStatement += "\t" + sReturnObjectVariableDefinition + oUnoObjectDefinition.getVariableName() + sSeparator + xIdlMethod.getName() + "(" + sParameterCode + ")";
        sStatement += m_xLanguageSourceCodeGenerator.getStatementTerminationCharacter();
        addExceptions(xIdlMethod);
        return sStatement;
    }
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

       
       
        public void addMethodsToTreeNode(XUnoNode _oGrandParentNode, Object _oUnoParentObject, XIdlMethod[] _xIdlMethods){
            if (this.m_oIntrospector.isValid(_xIdlMethods)){
                for ( int n = 0; n < _xIdlMethods.length; n++ ) {
                    XIdlMethod xIdlMethod = _xIdlMethods[n];
                    if (!xIdlMethod.getDeclaringClass().getName().equals("com.sun.star.uno.XInterface")){
                        XUnoMethodNode oChildNode = addMethodNode(_oUnoParentObject, xIdlMethod);
                        if (oChildNode != null){
                            _oGrandParentNode.addChildNode(oChildNode);
                        }
                    }
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

   
   
    public String getMethodStatementSourceCode(XUnoMethodNode _oUnoMethodNode, String _sVariableName, UnoObjectDefinition _oUnoReturnObjectDefinition){
        String sReturnObjectVariableDefinition = "";
        String sStatement = "";
        XIdlMethod xIdlMethod = _oUnoMethodNode.getXIdlMethod();
        TypeClass aReturnTypeClass = xIdlMethod.getReturnType().getTypeClass();
        UnoObjectDefinition oUnoObjectDefinition = new UnoObjectDefinition(_oUnoMethodNode.getUnoObject(), _oUnoMethodNode.getClassName());
        String sVariableStemName = this.generateVariableNameFromMethod(xIdlMethod);
        sStatement += addQueryInterfaceSourceCode(oUnoObjectDefinition, _sVariableName, oUnoObjectDefinition.getTypeName());
        if (_oUnoReturnObjectDefinition.getTypeClass().getValue() != TypeClass.VOID_value){
            sReturnObjectVariableDefinition = getVariableInitialization(_oUnoReturnObjectDefinition, false) + " = ";
        }
        Object[] oParamObjects = _oUnoReturnObjectDefinition.getParameterObjects();
        String sParameterCode = getMethodParameterValueDescription(_oUnoMethodNode, oParamObjects, false);
        String sSeparator = m_xLanguageSourceCodeGenerator.getMethodSeparator();
        sStatement += "\t" + sReturnObjectVariableDefinition + oUnoObjectDefinition.getVariableName() + sSeparator + xIdlMethod.getName() + "(" + sParameterCode + ")";
        sStatement += m_xLanguageSourceCodeGenerator.getStatementTerminationCharacter();
        addExceptions(xIdlMethod);
        return sStatement;
    }
View Full Code Here

Examples of com.sun.star.reflection.XIdlMethod

                    oRetComponentsVector.add(xEnumeration.nextElement());
                }
            }
            XIndexAccess xIndexAccess = (XIndexAccess) UnoRuntime.queryInterface( XIndexAccess.class, xIntrospectionAccessObject.queryAdapter(new Type( XIndexAccess.class )));
            if ( xIndexAccess != null ) {
                XIdlMethod mMethod = xIntrospectionAccessObject.getMethod("getByIndex", com.sun.star.beans.MethodConcept.INDEXCONTAINER);
                for ( int i = 0; i < xIndexAccess.getCount(); i++ ) {
                    Object[][] aParamInfo = new Object[1][1];
                    aParamInfo[0] = new Integer[] { new Integer(i) };
                    oRetComponentsVector.add(mMethod.invoke(_oUnoParentObject, aParamInfo));
                }
            }
        }
        if (oRetComponentsVector != null){
            oRetComponents = new Object[oRetComponentsVector.size()];
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.