//n0 stores array namespace: String n0 = "http://n0 ..."; stringArrayProperty = new PropertyInfo(); stringArrayProperty.setName("strarray"); stringArrayProperty.setValue(stringArray); stringArrayProperty.setType(stringArray.getClass()); stringArrayProperty.setNamespace(n0);
FileObject obj = processingEnv.getFiler().getResource(StandardLocation.SOURCE_PATH, "", typeElt.getQualifiedName().toString().replace('.', '/') + ".java"); File srcFolder = new File(obj.toUri()).getParentFile(); String filename = Case.SNAKE.format(Case.CAMEL.parse(typeElt.getSimpleName().toString())); for (Lang lang : langs) { if (isSkipped(typeElt, lang)) {
private static final String SOAP_ACTION = "http://tempuri.org/GetInteger2"; private static final String METHOD_NAME = "GetInteger2"; private static final String NAMESPACE = "http://tempuri.org/"; private static final String URL = "http://10.0.2.2:4711/Service1.asmx"; public int GetInteger2() throws IOException, XmlPullParserException { SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME); PropertyInfo pi = new PropertyInfo(); pi.setName("i"); pi.setValue(123); request.addProperty(pi); SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11); envelope.dotNet = true; envelope.setOutputSoapObject(request); AndroidHttpTransport androidHttpTransport = new AndroidHttpTransport(URL); androidHttpTransport.call(SOAP_ACTION, envelope); SoapPrimitive result = (SoapPrimitive)envelope.getResponse(); return Integer.parseInt(result.toString()); }
@Override public String filename(ClassModel model) { ModuleInfo module = model.getModule(); return module.translateQualifiedName(model.getFqn(), id) + ".java"; }
@Override public Map<String, Object> getVars() { Map<String, Object> vars = Model.super.getVars(); vars.put("fqn", info.getPackageName()); vars.put("name", info.getName()); vars.put("module", getModule()); vars.put("annotations", getAnnotations()); return vars; }
PropertyInfo pi = new PropertyInfo(); pi.setNamespace(QR_NAMESPACE); pi.setType(PropertyInfo.STRING_CLASS); pi.setName("ClientID"); pi.setValue(qr.getClientID()); result.addProperty(pi);
static void checkUnderModule(Model model, String annotation) { if (model.getModule() == null) { throw new GenException(model.getElement(), "Declaration annotated with " + annotation + " must be under a package annotated" + "with @ModuleGen. Check that the package '" + model.getFqn() + "' or a parent package contains a 'package-info.java' using the @ModuleGen annotation"); } }
@Override public String filename(DataObjectModel model) { if (model.isClass() && model.getGenerateConverter()) { return model.getFqn() + "Converter.java"; } return null; }
@Override public Map<String, Object> getVars() { Map<String, Object> vars = Model.super.getVars(); vars.put("type", getType()); vars.put("doc", doc); vars.put("values", values); vars.put("deprecated", deprecated); vars.put("deprecatedDesc", getDeprecatedDesc()); return vars; }
public ClassTypeInfo(ClassKind kind, String name, ModuleInfo module, boolean nullable, List<TypeParamInfo.Class> params) { this.kind = kind; this.name = name; this.simpleName = Helper.getSimpleName(name); this.packageName = Helper.getPackageName(name); this.module = module; this.nullable = nullable; this.params = params; }
/** * Translates the module package name for the specified {@code lang} parameter language. * * @param lang the language, for instance {@literal groovy} * @return the translated package name */ public String translatePackageName(String lang) { return translateQualifiedName(packageName, lang); }
protected void checkConstantType(VariableElement elem, TypeInfo type, TypeMirror typeMirror, boolean allowAnyJavaType) { if (isLegalNonCallableReturnType(type, allowAnyJavaType)) { return; } throw new GenException(elem, "type " + type + " is not legal for use for a constant type in code generation"); }
public boolean process() { if (!processed) { traverseType(modelElt); determineApiTypes(); processTypeAnnotations(); processed = true; return true; } else { return false; } }
PropertyInfo weightProp =new PropertyInfo(); weightProp.name = "arg0"; weightProp.setValue("rajan"); request.addProperty(weightProp);
protected MethodInfo createMethodInfo(Set<ClassTypeInfo> ownerTypes, String methodName, String comment, Doc doc, TypeInfo returnType, Text returnDescription, boolean isFluent, boolean isCacheReturn, List<ParamInfo> mParams, ExecutableElement methodElt, boolean isStatic, boolean isDefault, ArrayList<TypeParamInfo.Method> typeParams, TypeElement declaringElt, boolean methodDeprecated, Text methodDeprecatedDesc) { return new MethodInfo(ownerTypes, methodName, returnType, returnDescription, isFluent, isCacheReturn, mParams, comment, doc, isStatic, isDefault, typeParams, methodDeprecated, methodDeprecatedDesc); }
@Override public String filename(ClassModel model) { ModuleInfo module = model.getModule(); return module.translateQualifiedName(model.getFqn(), id) + ".java"; }
PropertyInfo fromProp =new PropertyInfo(); fromProp.setName("arg0"); fromProp.setValue(aa); fromProp.setType(String.class); request.addProperty(fromProp); PropertyInfo fromProp2 =new PropertyInfo(); fromProp2.setName("b"); fromProp2.setValue("Om$@!#@M^#R"); fromProp2.setType(String.class); request.addProperty(fromProp2);
//Inside your for loop PropertyInfo pi = new PropertyInfo(); resSoap.getPropertyInfo(i, pi); Log.d(TAG, pi.name + " : " + resSoap.getProperty(i).toString());