Tabnine Logo
Reflections.invokeAndUnwrap
Code IndexAdd Tabnine to your IDE (free)

How to use
invokeAndUnwrap
method
in
org.jboss.weld.util.reflection.Reflections

Best Java code snippets using org.jboss.weld.util.reflection.Reflections.invokeAndUnwrap (Showing top 20 results out of 315)

origin: org.jboss.weld.se/weld-se-shaded

public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable {
  Object instance = callable.call();
  if (instance == null) {
    throw BeanLogger.LOG.nullInstance(callable);
  }
  Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args);
  BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue);
  return returnValue;
}
origin: weld/core

public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable {
  Object instance = callable.call();
  if (instance == null) {
    throw BeanLogger.LOG.nullInstance(callable);
  }
  Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args);
  BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue);
  return returnValue;
}
origin: org.jboss.weld.se/weld-se

public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable {
  Object instance = callable.call();
  if (instance == null) {
    throw BeanLogger.LOG.nullInstance(callable);
  }
  Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args);
  BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue);
  return returnValue;
}
origin: weld/core

public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable {
  Object instance = callable.call();
  if (instance == null) {
    throw BeanLogger.LOG.nullInstance(callable);
  }
  Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args);
  BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue);
  return returnValue;
}
origin: weld/core

public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable {
  Object instance = callable.call();
  if (instance == null) {
    throw BeanLogger.LOG.nullInstance(callable);
  }
  Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args);
  BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue);
  return returnValue;
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable {
  Object instance = callable.call();
  if (instance == null) {
    throw BeanLogger.LOG.nullInstance(callable);
  }
  Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args);
  BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue);
  return returnValue;
}
origin: org.jboss.weld.se/weld-se-shaded

public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
  SecurityActions.ensureAccessible(proceed);
  if (proceed == null) {
    if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) {
      return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack);
    } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) {
      return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack);
    }
  } else {
    if (isInterceptorMethod(thisMethod)) {
      return Reflections.invokeAndUnwrap(self, proceed, args);
    }
    return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack);
  }
  return null;
}
origin: org.jboss.weld.se/weld-se

protected Object executeInterception(Object instance, Method method, Method proceed, Object[] args, InterceptionType interceptionType, Stack stack) throws Throwable {
  CachedInterceptionChain chain = getInterceptionChain(instance, method, interceptionType);
  if (chain.interceptorMethods.isEmpty()) {
    // shortcut if there are no interceptors
    if (proceed == null) {
      return null;
    } else {
      return Reflections.invokeAndUnwrap(instance, proceed, args);
    }
  }
  if (InterceptionType.AROUND_INVOKE == interceptionType) {
    return executeAroundInvoke(instance, method, proceed, args, chain, stack);
  } else {
    return executeLifecycleInterception(instance, method, proceed, args, chain, stack);
  }
}
protected Object executeLifecycleInterception(Object instance, Method method, Method proceed, Object[] args, CachedInterceptionChain chain, Stack stack) throws Throwable {
origin: weld/core

  private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable {
    if (!method.isAnnotationPresent(Inject.class)) {
      InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method);
      if (decoratorMethod != null) {
        try {
          return decoratorMethod.invokeOnInstance(decoratorInstance, args);
        } catch (InvocationTargetException e) {
          throw e.getCause();
        }
      }
    }
    SecurityActions.ensureAccessible(method);
    return Reflections.invokeAndUnwrap(getTargetInstance(), method, args);
  }
}
origin: weld/core

  private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable {
    if (!method.isAnnotationPresent(Inject.class)) {
      InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method);
      if (decoratorMethod != null) {
        try {
          return decoratorMethod.invokeOnInstance(decoratorInstance, args);
        } catch (InvocationTargetException e) {
          throw e.getCause();
        }
      }
    }
    SecurityActions.ensureAccessible(method);
    return Reflections.invokeAndUnwrap(getTargetInstance(), method, args);
  }
}
origin: weld/core

protected Object executeInterception(Object instance, Method method, Method proceed, Object[] args, InterceptionType interceptionType, Stack stack) throws Throwable {
  CachedInterceptionChain chain = getInterceptionChain(instance, method, interceptionType);
  if (chain.interceptorMethods.isEmpty()) {
    // shortcut if there are no interceptors
    if (proceed == null) {
      return null;
    } else {
      return Reflections.invokeAndUnwrap(instance, proceed, args);
    }
  }
  if (InterceptionType.AROUND_INVOKE == interceptionType) {
    return executeAroundInvoke(instance, method, proceed, args, chain, stack);
  } else {
    return executeLifecycleInterception(instance, method, proceed, args, chain, stack);
  }
}
protected Object executeLifecycleInterception(Object instance, Method method, Method proceed, Object[] args, CachedInterceptionChain chain, Stack stack) throws Throwable {
origin: weld/core

public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
  SecurityActions.ensureAccessible(proceed);
  if (proceed == null) {
    if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) {
      return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack);
    } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) {
      return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack);
    }
  } else {
    if (isInterceptorMethod(thisMethod)) {
      return Reflections.invokeAndUnwrap(self, proceed, args);
    }
    return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack);
  }
  return null;
}
origin: org.jboss.weld.se/weld-se

public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
  SecurityActions.ensureAccessible(proceed);
  if (proceed == null) {
    if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) {
      return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack);
    } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) {
      return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack);
    }
  } else {
    if (isInterceptorMethod(thisMethod)) {
      return Reflections.invokeAndUnwrap(self, proceed, args);
    }
    return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack);
  }
  return null;
}
origin: org.jboss.weld.servlet/weld-servlet-shaded

public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
  SecurityActions.ensureAccessible(proceed);
  if (proceed == null) {
    if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) {
      return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack);
    } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) {
      return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack);
    }
  } else {
    if (isInterceptorMethod(thisMethod)) {
      return Reflections.invokeAndUnwrap(self, proceed, args);
    }
    return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack);
  }
  return null;
}
origin: weld/core

public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable {
  SecurityActions.ensureAccessible(proceed);
  if (proceed == null) {
    if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) {
      return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack);
    } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) {
      return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack);
    }
  } else {
    if (isInterceptorMethod(thisMethod)) {
      return Reflections.invokeAndUnwrap(self, proceed, args);
    }
    return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack);
  }
  return null;
}
origin: weld/core

  private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable {
    if (!method.isAnnotationPresent(Inject.class)) {
      InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method);
      if (decoratorMethod != null) {
        try {
          return decoratorMethod.invokeOnInstance(decoratorInstance, args);
        } catch (InvocationTargetException e) {
          throw e.getCause();
        }
      }
    }
    SecurityActions.ensureAccessible(method);
    return Reflections.invokeAndUnwrap(getTargetInstance(), method, args);
  }
}
origin: weld/core

protected Object executeInterception(Object instance, Method method, Method proceed, Object[] args, InterceptionType interceptionType, Stack stack) throws Throwable {
  CachedInterceptionChain chain = getInterceptionChain(instance, method, interceptionType);
  if (chain.interceptorMethods.isEmpty()) {
    // shortcut if there are no interceptors
    if (proceed == null) {
      return null;
    } else {
      return Reflections.invokeAndUnwrap(instance, proceed, args);
    }
  }
  if (InterceptionType.AROUND_INVOKE == interceptionType) {
    return executeAroundInvoke(instance, method, proceed, args, chain, stack);
  } else {
    return executeLifecycleInterception(instance, method, proceed, args, chain, stack);
  }
}
protected Object executeLifecycleInterception(Object instance, Method method, Method proceed, Object[] args, CachedInterceptionChain chain, Stack stack) throws Throwable {
origin: org.jboss.weld.servlet/weld-servlet-shaded

  private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable {
    if (!method.isAnnotationPresent(Inject.class)) {
      InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method);
      if (decoratorMethod != null) {
        try {
          return decoratorMethod.invokeOnInstance(decoratorInstance, args);
        } catch (InvocationTargetException e) {
          throw e.getCause();
        }
      }
    }
    SecurityActions.ensureAccessible(method);
    return Reflections.invokeAndUnwrap(getTargetInstance(), method, args);
  }
}
origin: org.jboss.weld.se/weld-se

  private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable {
    if (!method.isAnnotationPresent(Inject.class)) {
      InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method);
      if (decoratorMethod != null) {
        try {
          return decoratorMethod.invokeOnInstance(decoratorInstance, args);
        } catch (InvocationTargetException e) {
          throw e.getCause();
        }
      }
    }
    SecurityActions.ensureAccessible(method);
    return Reflections.invokeAndUnwrap(getTargetInstance(), method, args);
  }
}
origin: org.jboss.weld.se/weld-se-shaded

  private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable {
    if (!method.isAnnotationPresent(Inject.class)) {
      InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method);
      if (decoratorMethod != null) {
        try {
          return decoratorMethod.invokeOnInstance(decoratorInstance, args);
        } catch (InvocationTargetException e) {
          throw e.getCause();
        }
      }
    }
    SecurityActions.ensureAccessible(method);
    return Reflections.invokeAndUnwrap(getTargetInstance(), method, args);
  }
}
org.jboss.weld.util.reflectionReflectionsinvokeAndUnwrap

Javadoc

Invokes the method on a given instance passing in given parameters. If the invocation yields InvocationTargetException, the exception is unwrapped. It is a responsibility of the caller to make sure that the method is accessible to the caller.

Popular methods of Reflections

  • cast
  • getRawType
  • loadClass
    Tries to load a class using the specified ResourceLoader. Returns null if the class is not found.
  • getInterfaceClosure
  • isClassLoadable
  • isTopLevelOrStaticNestedClass
  • isUnboundedTypeVariable
  • isUnboundedWildcard
  • addInterfaces
  • buildTypeMap
  • containsWildcards
  • getActualTypeArguments
    Gets the actual type arguments of a Type
  • containsWildcards,
  • getActualTypeArguments,
  • getBound,
  • getNesting,
  • getNonPrivateNonStaticFinalMethod,
  • getPropertyName,
  • isAbstract,
  • isArrayType,
  • isCacheable

Popular in Java

  • Making http requests using okhttp
  • getExternalFilesDir (Context)
  • setRequestProperty (URLConnection)
  • getContentResolver (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top plugins for WebStorm
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