congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
InjectableFactory.instantiate
Code IndexAdd Tabnine to your IDE (free)

How to use
instantiate
method
in
org.apache.wink.common.internal.registry.InjectableFactory

Best Java code snippets using org.apache.wink.common.internal.registry.InjectableFactory.instantiate (Showing top 4 results out of 315)

origin: org.apache.wink/wink-server

public void handleRequest(MessageContext context, HandlersChain chain) throws Throwable {
  SearchResult result = context.getAttribute(SearchResult.class);
  // create and save the invocation parameters for the found method
  List<Injectable> formal = result.getMethod().getMetadata().getFormalParameters();
  logger.trace("Formal Injectable parameters list is: {}", formal); //$NON-NLS-1$
  Object[] parameters = InjectableFactory.getInstance().instantiate(formal, context);
  if(logger.isTraceEnabled()) {
    if(parameters == null) {
      logger.trace("Actual parameters list to inject is: null"); //$NON-NLS-1$
    } else {
      logger.trace("Actual parameters list to inject is: {}", parameters); //$NON-NLS-1$
    }
  }
  result.setInvocationParameters(parameters);
  chain.doChain(context);
}
origin: org.apache.wink/wink-common

  InjectableFactory.getInstance().instantiate(method.getFormalParameters(), context);
try {
origin: org.apache.wink/wink-common

  InjectableFactory.getInstance().instantiate(method.getFormalParameters(), context);
try {
origin: org.apache.wink/wink-common

/**
 * creates object (StaticResource or Provider) based on its ClassMetadata
 * 
 * @param metadata
 * @param runtimeContext
 * @return created object
 */
static Object createObject(ClassMetadata metadata, RuntimeContext runtimeContext) {
  try {
    // use constructor to create a prototype
    ConstructorMetadata constructorMetadata = metadata.getConstructor();
    Constructor<?> constructor = constructorMetadata.getConstructor();
    List<Injectable> formalParameters = constructorMetadata.getFormalParameters();
    Object[] params =
      InjectableFactory.getInstance().instantiate(formalParameters, runtimeContext);
    Object object = constructor.newInstance(params);
    injectFields(object, metadata, runtimeContext);
    return object;
  } catch (RuntimeException e) {
    throw e;
  } catch (InvocationTargetException e) {
    Throwable targetException = e.getTargetException();
    if (targetException instanceof RuntimeException) {
      throw (RuntimeException)targetException;
    }
    throw new ObjectCreationException(targetException);
  } catch (Exception e) {
    throw new ObjectCreationException(e);
  }
}
org.apache.wink.common.internal.registryInjectableFactoryinstantiate

Javadoc

Instantiates a list of formal parameters into an Object array

Popular methods of InjectableFactory

  • setInstance
  • getInstance
  • create
  • createContextParam
  • createCookieParam
  • createEntityParam
  • createFormParam
  • createHeaderParam
  • createMatrixParam
  • createPathParam
  • createQueryParam
  • createQueryParam

Popular in Java

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Path (java.nio.file)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • 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