Codota Logo
TypeConverter
Code IndexAdd Codota to your IDE (free)

How to use
TypeConverter
in
org.apache.xmlrpc.common

Best Java code snippets using org.apache.xmlrpc.common.TypeConverter (Showing top 15 results out of 315)

  • Common ways to obtain TypeConverter
private void myMethod () {
TypeConverter t =
  • Codota IconTypeConverterFactory typeConverterFactory;Method method;typeConverterFactory.getTypeConverter(method.getReturnType())
  • Codota IconTypeConverterFactory typeConverterFactory;typeConverterFactory.getTypeConverter(paramClasses[i])
  • Codota IconClass pClass;new CastCheckingTypeConverter(pClass)
  • Smart code suggestions by Codota
}
origin: org.openengsb.connector/org.openengsb.connector.trac

  public Object invoke(Object proxy, Method method, Object[] args)
    throws InvocationTargetException, IllegalAccessException, XmlRpcException {
    if (isObjectMethodLocal() && method.getDeclaringClass().equals(Object.class)) {
      return method.invoke(proxy, args);
    }
    String classname = clazz.getName().replaceFirst(clazz.getPackage().getName() + ".", "").toLowerCase();
    classname = classname.replace("$", "."); // dirty hack TODO
    String methodName = classname + "." + method.getName();
    Object result = client.execute(methodName, args);
    TypeConverter typeConverter = typeConverterFactory.getTypeConverter(method.getReturnType());
    return typeConverter.convert(result);
  }
});
origin: org.apache.xmlrpc/xmlrpc-server

boolean matching = true;
for (int j = 0;  j < args.length;  j++) {
  if (!converters[j].isConvertable(args[j])) {
    matching = false;
    break;
    args[j] = converters[j].convert(args[j]);
origin: rosjava/rosjava_core

return typeConverter.backConvert(result);
origin: org.sonatype.sisu/sisu-xmlrpc-server

boolean matching = true;
for (int j = 0;  j < args.length;  j++) {
  if (!converters[j].isConvertable(args[j])) {
    matching = false;
    break;
    args[j] = converters[j].convert(args[j]);
origin: org.apache.xmlrpc/xmlrpc-client

return typeConverter.backConvert(result);
origin: org.apache.continuum/continuum-xmlrpc-server

for ( int j = 0; j < args.length; j++ )
  if ( !converters[j].isConvertable( args[j] ) )
    args[j] = converters[j].convert( args[j] );
origin: xmlrpc/xmlrpc-client

  public Object invoke(Object pProxy, Method pMethod, Object[] pArgs) throws Throwable {
    if (isObjectMethodLocal()  &&  pMethod.getDeclaringClass().equals(Object.class)) {
      return pMethod.invoke(pProxy, pArgs);
    }
    String methodName = pClass.getName() + "." + pMethod.getName();
    Object result = client.execute(methodName, pArgs);
    TypeConverter typeConverter = typeConverterFactory.getTypeConverter(pMethod.getReturnType());
    return typeConverter.convert(result);
  }
});
origin: xmlrpc/xmlrpc-client

return typeConverter.backConvert(result);
origin: org.apache.maven.continuum/continuum-xmlrpc-server

for ( int j = 0; j < args.length; j++ )
  if ( !converters[j].isConvertable( args[j] ) )
    args[j] = converters[j].convert( args[j] );
origin: org.apache.xmlrpc/xmlrpc-client

return typeConverter.convert(result);
origin: rosjava/rosjava_core

boolean matching = true;
for (int j = 0;  j < args.length;  j++) {
  if (!converters[j].isConvertable(args[j])) {
    matching = false;
    break;
    args[j] = converters[j].convert(args[j]);
origin: org.sonatype.sisu/sisu-xmlrpc-client

return typeConverter.convert(result);
origin: rosjava/rosjava_core

return typeConverter.convert(result);
origin: rosjava/rosjava_core

return typeConverter.convert(result);
origin: sonia.trac/javatrac

 public Object invoke(Object pProxy, Method pMethod, Object[] pArgs) throws Throwable {
   String tracClassName = Utils.findTracClassName(aClass);
   if(tracClassName == null){
     throw new TracException(MessageUtils.registerErrorLog(log, "core.no.trac.classname.found", aClass.getName()));
   }
   TracClassMethod tracClassMethodMetadata = Utils.getTracClassMethodAnnotation(pMethod);
   String methodName = Utils.buildTracMethodNameInvocation(tracClassName, tracClassMethodMetadata);
   Object result = null;
   try {
     result = getClient().execute(methodName, pArgs);
   } catch (XmlRpcInvocationException e) {
     throw new TracException(MessageUtils.registerErrorLog(log, "core.invocation.factory.invocation.exception", e.getMessage()), e);
   } catch(XmlRpcException e){
     throw new TracException(MessageUtils.registerErrorLog(log, "core.invocation.factory.xmlrpc.exception", e.getMessage()), e);
   }
   catch (Throwable e){
     throw new TracException(MessageUtils.registerErrorLog(log, "core.invocation.factory.unknown.exception", e.getMessage()), e);
   }
   Class returnType = tracClassMethodMetadata.tracReturnType();
   if(returnType == Object.class){
     returnType = pMethod.getReturnType();
   }
   TypeConverter typeConverter = typeConverterFactory.getTypeConverter(returnType);
   return typeConverter.convert(result);
  }
});
org.apache.xmlrpc.commonTypeConverter

Javadoc

A TypeConverter is used when actually calling the handler method or actually returning the result object. It's purpose is to convert a single parameter or the return value from a generic representation (for example an array of objects) to an alternative representation, which is actually used in the methods signature (for example List, or Vector.

Most used methods

  • convert
    Converts the given object into the required representation.
  • isConvertable
    Returns, whether the TypeConverter is ready to handle the given object. If so, #convert(Object) may
  • backConvert
    Converts the given object into its generic representation.

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Menu (java.awt)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Option (scala)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now