Tabnine Logo
Context2ObjectUtil.getObject
Code IndexAdd Tabnine to your IDE (free)

How to use
getObject
method
in
org.tinygroup.context2object.util.Context2ObjectUtil

Best Java code snippets using org.tinygroup.context2object.util.Context2ObjectUtil.getObject (Showing top 5 results out of 315)

origin: org.tinygroup/org.tinygroup.cepcore

  private Object getArgument(Context context, Parameter param) {
    String paramName = param.getName();
    Object obj = Context2ObjectUtil.getObject(param, context, this
        .getClass().getClassLoader());
    if (obj == null) {
      if (param.isRequired()) { // 如果输入参数是必须的,则抛出异常
        LOGGER.logMessage(LogLevel.ERROR, "参数{paramName}未传递", paramName);
        throw new ParamIsNullException(paramName);
      } else { // 如果输出参数非必须,直接返回null
        return null;
      }
    }
    if (!(obj instanceof String)) {
      return obj;
    }
    return ValueUtil.getValue((String) obj, param.getType());
  }
}
origin: org.tinygroup/service

private Object getArgument(Context context, int i) {
  Parameter des = inputParameters.get(i);
  String paramName = des.getName();
  // =============20130619修改bengin================
  Object obj = Context2ObjectUtil.getObject(des, context);
  // =============20130619修改end================
  if (obj == null) {
    if (des.isRequired()) { // 如果输入参数是必须的,则抛出异常
      logger.logMessage(LogLevel.ERROR, "参数{paramName}未传递", paramName);
      throw new ParamIsNullException(paramName);
    } else { // 如果输出参数非必须,直接返回null
      return null;
    }
  }
  if (!(obj instanceof String)) {
    return obj;
  }
  return ValueUtil.getValue((String) obj, des.getType());
}
origin: org.tinygroup/org.tinygroup.service

private Object getArgument(Context context, int i) {
  Parameter des = inputParameters.get(i);
  String paramName = des.getName();
  // =============20130619修改bengin================
  Object obj = Context2ObjectUtil.getObject(des, context, loader);
  // =============20130619修改end================
  if (obj == null) {
    if (des.isRequired()) { // 如果输入参数是必须的,则抛出异常
      LOGGER.logMessage(LogLevel.ERROR, "参数{paramName}未传递", paramName);
      throw new ParamIsNullException(paramName);
    } else { // 如果输出参数非必须,直接返回null
      return null;
    }
  }
  if (!(obj instanceof String)) {
    return obj;
  }
  return ValueUtil.getValue((String) obj, des.getType());
}
origin: org.tinygroup/org.tinygroup.cepcorebase

if (!oldContext.exist(inputName)) {
  return Context2ObjectUtil.getObject(input, oldContext, loader);
} else {
origin: org.tinygroup/org.tinygroup.cepcore

public static Context getContext(Event event, ServiceInfo info, ClassLoader loder) {
  Context c = new ContextImpl();
  Context oldContext = event.getServiceRequest().getContext();
  if (info.getParameters() == null) {
    return c;
  }
  for (Parameter p : info.getParameters()) {
    Object value = Context2ObjectUtil.getObject(p, oldContext, loder);
    if (value != null && !(value instanceof java.io.Serializable)) {
      throw new ParamNotSerializableException(event
          .getServiceRequest().getServiceId(), p.getName());
    }
    c.put(p.getName(), value);
  }
  return c;
}
org.tinygroup.context2object.utilContext2ObjectUtilgetObject

Popular methods of Context2ObjectUtil

  • getObjectByGenerator
  • getCollectionInstance
  • isNull
  • isSimpleType

Popular in Java

  • Reading from database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • getSharedPreferences (Context)
  • setRequestProperty (URLConnection)
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top Sublime Text plugins
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