Tabnine Logo
TypeConverter
Code IndexAdd Tabnine 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)

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

  • Start an intent from android
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now