referenceTypeName=CIMSPLTypeConstants.getReferenceTypeName(path);
}
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" symboltable does not currently contain the given property, so creating property symbol");
Symbol symbol =new PropertySymbol(qualifiedPropertyName,type,referenceTypeName,cimproperty.isArray(),_isKey(cimproperty),true);
//add property to properties list
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" adding property to Map in datacollector : "+qualifiedPropertyName);
symbols.put(qualifiedPropertyName, symbol);
}
else
{
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" symboltable already contains the given symbol "+cimproperty.getName().toLowerCase());
logger.severe(qualifiedPropertyName+" symbol Already exists in SymbolTable");
throw new SPLException("symbol Already exists in SymbolTable");
}
}
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" done adding all the properties");
if(logger.isLoggable(Level.FINE))
logger.fine(Thread.currentThread().getName()+" get all methods of the class and iterate over them");
//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);
symbols.put(methodName, methodSymbol);
}