Package org.sblim.wbem.cim

Examples of org.sblim.wbem.cim.CIMMethod


  {
    Vector methods = cimClass.getAllMethods();
    //get all methods of the class and iterate over them
    for(int i=0;i<methods.size();i++)
    {
      CIMMethod cimMethod= (CIMMethod)methods.get(i);

      if(logger.isLoggable(Level.FINE))
        logger.fine(Thread.currentThread().getName()+" method : "+cimMethod.getName()+
            " Parameter count "+cimMethod.getParameters()+" is of type "+cimMethod.getType());
//      //ArrayList argTypeList=new ArrayList ();
      List methodArgs=new ArrayList();
      SPLSymbolTable methodArgsSymbolTable=new SPLSymbolTable();
     
            Vector parameters = cimMethod.getParameters();
      for(int j=0; j<parameters.size(); j++)
      {
        CIMParameter cimparameter = (CIMParameter)parameters.get(j);
        String parameterName=cimparameter.getName();
        //boolean isArr=cimparameter.isArray();
        int type=CIMSPLTypeConstants.convertCIMTypeToInternalType(cimparameter.getType().getType());
        boolean isArray = CIMSPLTypeConstants.getIsArray(cimparameter.getType().getType());
        String referenceTypeName="";
       
        if(type == TypeConstants.referenceType)
        { 
          referenceTypeName = CIMSPLTypeConstants.getReferenceTypeName(cimparameter.getName());
        }
        Argument arg=new ArgumentImpl(type, parameterName, isArray, referenceTypeName);
       
        methodArgsSymbolTable.insertVariableSymbol(parameterName, type, referenceTypeName, isArray, 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().getType());

        Symbol methodSymbol = new MethodSymbol(methodName,localReturnType,
            CIMSPLTypeConstants.getIsArray(localReturnType),cimClass.getName(),methodArgs,methodArgsSymbolTable);
        //add property to properties list
        if(logger.isLoggable(Level.FINE))
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);
          Vector params = cimMethod.getParameters();
          for(int j=0;j<params.size();j++)
          {
            CIMParameter cimparameter=(CIMParameter)params.get(j);
            String parameterName=cimparameter.getName();
            int type=cimparameter.getType().getType();
View Full Code Here

TOP

Related Classes of org.sblim.wbem.cim.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.