Package org.pegasus.jmpi

Examples of org.pegasus.jmpi.CIMMethod



          //get all methods of the class and iterate over them
          for(int i=0;i<cimclass.getMethodCount();i++)
          {
            CIMMethod cimMethod= cimclass.getMethod(i);

            if(logger.isLoggable(Level.FINE))
              logger.fine(Thread.currentThread().getName()+" method : "+cimMethod.getName()+ " Parameter count "+cimMethod.getParameterCount()+" is of type "+cimMethod.getType());
//            //ArrayList argTypeList=new ArrayList ();
            List methodArgs=new ArrayList();
            SPLSymbolTable methodArgsSymbolTable=new SPLSymbolTable();

            for(int j=0;j<cimMethod.getParameterCount();j++)
            {
              CIMParameter cimparameter=cimMethod.getParameter(j);
              String parameterName=cimparameter.getName();
              boolean isArr=cimparameter.isArray();
              int type=CIMSPLTypeConstants.convertCIMTypeToInternalType(cimparameter.getType().getType());

              String referenceTypeName="";

              if(type == TypeConstants.referenceType)
              { 
                referenceTypeName = CIMSPLTypeConstants.getReferenceTypeName(cimparameter.getReferenceClassName());
              }
              Argument arg=new ArgumentImpl(type, parameterName, isArr, referenceTypeName);

              methodArgsSymbolTable.insertVariableSymbol(parameterName, type, referenceTypeName, isArr, false, false);
              //System.out.println(" inserted variable symbol into methodArgsSymbolTable "+parameterName);
              methodArgs.add(arg);
            }
            String methodName=cimMethod.getName();
            if( ! symbols.containsKey(methodName))
            {
              int localReturnType=CIMSPLTypeConstants.convertCIMTypeToInternalType(cimMethod.getType());

              Symbol methodSymbol=new MethodSymbol(methodName,localReturnType,CIMSPLTypeConstants.getIsArray(localReturnType),cimclass.getName(),methodArgs,methodArgsSymbolTable);
              //add property to properties list
              if(logger.isLoggable(Level.FINE))
                logger.fine(Thread.currentThread().getName()+" adding method to symbol table" + methodName);
View Full Code Here


        {
          cop=(CIMObjectPath)instance;
          CIMObjectPath classCop=new CIMObjectPath(className,namespace);
          CIMClass cimclass=handle.getClass(classCop, true, true, true, null);

          CIMMethod cimMethod= cimclass.getMethod(methodName);
          inParams=getMethodInputParams(cimMethod, cimArgNameValuePairs);
          if(logger.isLoggable(Level.FINE))
            logger.fine(Thread.currentThread().getName()+" Actuator::invokeMethod:invoking method "+methodName);

          CIMObjectPath instanceCop=new CIMObjectPath(className,namespace);
View Full Code Here

TOP

Related Classes of org.pegasus.jmpi.CIMMethod

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.