public void addOperation(GOperationInfo operationInfo) { operations.put(new GOperationSignature(operationInfo.getName(), operationInfo.getParameterList()), operationInfo); }
/** * Return operation info as map */ private Map<String, Object> getOperInfoAsMap(GOperationInfo operInfo) { Map<String, Object> map = new TreeMap<String, Object>(); map.put("methodName", operInfo.getMethodName()); map.put("name", operInfo.getName()); map.put("parameterList", operInfo.getParameterList()); return map; }
private GBeanOperation(GBeanInstance gbeanInstance, String name, List parameterTypes, MethodInvoker methodInvoker) { framework = true; this.gbeanInstance = gbeanInstance; this.name = name; this.parameterTypes = Collections.unmodifiableList(new ArrayList(parameterTypes)); this.methodInvoker = methodInvoker; // this is not used this.operationInfo = new GOperationInfo(this.name, this.parameterTypes, "java.lang.Object"); }
public GBeanOperation(GBeanInstance gbeanInstance, GOperationInfo operationInfo) throws InvalidConfigurationException { framework = false; this.gbeanInstance = gbeanInstance; this.name = operationInfo.getName(); this.operationInfo = operationInfo; this.parameterTypes = Collections.unmodifiableList(new ArrayList(operationInfo.getParameterList())); Class[] types = new Class[parameterTypes.size()]; ClassLoader classLoader = gbeanInstance.getClassLoader(); } catch (ClassNotFoundException e) { throw new InvalidConfigurationException("Could not load operation parameter class:" + " name=" + operationInfo.getName() + " class=" + type, e); } else { try { Method javaMethod = gbeanInstance.getType().getMethod(operationInfo.getMethodName(), types); if (AbstractGBeanReference.NO_PROXY) { methodInvoker = new ReflectionMethodInvoker(javaMethod); " name=" + operationInfo.getName() + " methodName=" + operationInfo.getMethodName() + " returnType=" + operationInfo.getReturnType() + " targetClass=" + gbeanInstance.getType().getName(), e);
public static LinkedHashSet<String> getImports(List<GBeanData> gbeans) { LinkedHashSet<String> imports = new LinkedHashSet<String>(); for (GBeanData data: gbeans) { GBeanInfo info = data.getGBeanInfo(); addImport(imports, info.getClassName()); for (GAttributeInfo attInfo: info.getAttributes()) { addImport(imports, attInfo.getType()); } for (GReferenceInfo refInfo: info.getReferences()) { addImport(imports, refInfo.getReferenceType()); } for (GOperationInfo opInfo: info.getOperations()) { addImport(imports, opInfo.getReturnType()); for (String paramType : opInfo.getParameterList()) { addImport(imports, paramType); } } } return imports; }
for (Iterator iterator = operationInfos.iterator(); iterator.hasNext();) { GOperationInfo operationInfo = (GOperationInfo) iterator.next(); operationSignatures.add(new GOperationSignature(operationInfo.getName(), operationInfo.getParameterList()));
/** * @deprecated */ public void addOperation(String name) { // FIXME : This is needed because the getters/setters are not being added as operation // i.e. kerenl.invoke("getX") fails. addOperation(new GOperationInfo(name, NO_ARGS, "")); }
operations.put(new GOperationSignature(operationInfo.getName(), operationInfo.getParameterList()), operationInfo);
public void addOperation(String name, String returnType) { addOperation(new GOperationInfo(name, NO_ARGS, returnType)); }
for (Iterator iterator = gbeanInfo.getOperations().iterator(); iterator.hasNext();) { GOperationInfo operationInfo = (GOperationInfo) iterator.next(); GOperationSignature signature = new GOperationSignature(operationInfo.getName(), operationInfo.getParameterList());
public void addOperation(String name, Class[] paramTypes, String returnType) { addOperation(new GOperationInfo(name, paramTypes, returnType)); }
addOperation(new GOperationInfo(method.getName(), method.getParameterTypes(), method.getReturnType().getName()));