Tabnine Logo
MethodIdentifier.getIdentifierForMethod
Code IndexAdd Tabnine to your IDE (free)

How to use
getIdentifierForMethod
method
in
org.jboss.invocation.proxy.MethodIdentifier

Best Java code snippets using org.jboss.invocation.proxy.MethodIdentifier.getIdentifierForMethod (Showing top 20 results out of 315)

origin: wildfly/wildfly

public Set<MethodIdentifier> getTimerMethods() {
  final Set<MethodIdentifier> methods = new HashSet<MethodIdentifier>();
  if (timeoutMethod != null) {
    methods.add(MethodIdentifier.getIdentifierForMethod(timeoutMethod));
  }
  for (Method method : scheduleMethods.keySet()) {
    methods.add(MethodIdentifier.getIdentifierForMethod(method));
  }
  return methods;
}
origin: wildfly/wildfly

public int getTransactionTimeout(final MethodIntf methodIntf, final Method method) {
  return getTransactionTimeout(methodIntf, MethodIdentifier.getIdentifierForMethod(method));
}
origin: wildfly/wildfly

public TransactionAttributeType getTransactionAttributeType(final MethodIntf methodIntf, final Method method) {
  return getTransactionAttributeType(methodIntf, MethodIdentifier.getIdentifierForMethod(method));
}
origin: wildfly/wildfly

protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final StatefulComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
  final RuntimeAnnotationInformation<Boolean> removeMethods = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, Remove.class);
  for (Map.Entry<Method, List<Boolean>> entry : removeMethods.getMethodAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      final Boolean retainIfException = entry.getValue().get(0);
      final MethodIdentifier removeMethodIdentifier = MethodIdentifier.getIdentifierForMethod(entry.getKey());
      componentConfiguration.addRemoveMethod(removeMethodIdentifier, retainIfException);
    }
  }
}
origin: wildfly/wildfly

@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription description) throws DeploymentUnitProcessingException {
  final RuntimeAnnotationInformation<Boolean> data = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, Asynchronous.class);
  for (final Map.Entry<String, List<Boolean>> entry : data.getClassAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      description.addAsynchronousClass(entry.getKey());
    }
  }
  for (final Map.Entry<Method, List<Boolean>> entry : data.getMethodAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      description.addAsynchronousMethod(MethodIdentifier.getIdentifierForMethod(entry.getKey()));
    }
  }
}
origin: wildfly/wildfly

protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription componentConfiguration) {
  //handle lock annotations
  final RuntimeAnnotationInformation<LockType> lockData = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, Lock.class);
  for (Map.Entry<String, List<LockType>> entry : lockData.getClassAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      componentConfiguration.setBeanLevelLockType(entry.getKey(), entry.getValue().get(0));
    }
  }
  for (Map.Entry<Method, List<LockType>> entry : lockData.getMethodAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      componentConfiguration.setLockType(entry.getValue().get(0), MethodIdentifier.getIdentifierForMethod(entry.getKey()));
    }
  }
  final RuntimeAnnotationInformation<AccessTimeoutDetails> accessTimeout = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, AccessTimeout.class);
  for (Map.Entry<String, List<AccessTimeoutDetails>> entry : accessTimeout.getClassAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      componentConfiguration.setBeanLevelAccessTimeout(entry.getKey(), entry.getValue().get(0));
    }
  }
  for (Map.Entry<Method, List<AccessTimeoutDetails>> entry : accessTimeout.getMethodAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      componentConfiguration.setAccessTimeout(entry.getValue().get(0), MethodIdentifier.getIdentifierForMethod(entry.getKey()));
    }
  }
}
origin: wildfly/wildfly

methodIdentifiers.add(MethodIdentifier.getIdentifierForMethod(method));
origin: wildfly/wildfly

description.excludeDefaultInterceptors(MethodIdentifier.getIdentifierForMethod(entry.getKey()));
description.excludeClassInterceptors(MethodIdentifier.getIdentifierForMethod(entry.getKey()));
final MethodIdentifier method = MethodIdentifier.getIdentifierForMethod(entry.getKey());
for (final String interceptor : entry.getValue().get(0)) {
  description.addMethodInterceptor(method, new InterceptorDescription(interceptor));
origin: wildfly/wildfly

  @Override
  public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException {
    final SessionBeanComponentDescription componentDescription = (SessionBeanComponentDescription) componentConfiguration.getComponentDescription();
    for (final Method method : configuration.getProxyFactory().getCachedMethods()) {
      //we need the component method to get the correct declaring class
      final Method componentMethod = ClassReflectionIndexUtil.findMethod(deploymentReflectionIndex, componentClass, method);
      if (componentMethod != null) {
        if (componentDescription.getAsynchronousClasses().contains(componentMethod.getDeclaringClass().getName())) {
          addAsyncInterceptor(configuration, method, isSecurityDomainKnown);
          configuration.addAsyncMethod(method);
        } else {
          MethodIdentifier id = MethodIdentifier.getIdentifierForMethod(method);
          if (componentDescription.getAsynchronousMethods().contains(id)) {
            addAsyncInterceptor(configuration, method, isSecurityDomainKnown);
            configuration.addAsyncMethod(method);
          }
        }
      }
    }
  }
});
origin: wildfly/wildfly

protected void processTxAttr(final EJBComponentDescription ejbComponentDescription, final MethodIntf methodIntf, final Method method) {
  if (this.getTransactionManagementType().equals(TransactionManagementType.BEAN)) {
    // it's a BMT bean
    return;
  }
  MethodIntf defaultMethodIntf = (ejbComponentDescription instanceof MessageDrivenComponentDescription) ? MethodIntf.MESSAGE_ENDPOINT : MethodIntf.BEAN;
  TransactionAttributeType txAttr = ejbComponentDescription.getTransactionAttributes().getAttribute(methodIntf, method, defaultMethodIntf);
  MethodTransactionAttributeKey key = new MethodTransactionAttributeKey(methodIntf, MethodIdentifier.getIdentifierForMethod(method));
  if(txAttr != null) {
    txAttrs.put(key, txAttr);
    txExplicitAttrs.put(key, ejbComponentDescription.getTransactionAttributes().isMethodLevel(methodIntf, method, defaultMethodIntf));
  }
  Integer txTimeout = ejbComponentDescription.getTransactionTimeouts().getAttribute(methodIntf, method, defaultMethodIntf);
  if (txTimeout != null) {
    txTimeouts.put(key, txTimeout);
  }
}
origin: wildfly/wildfly

final Method componentMethod = ClassReflectionIndexUtil.findMethod(index, componentConfiguration.getComponentClass(), MethodIdentifier.getIdentifierForMethod(method));
origin: wildfly/wildfly

  @Override
  public void configure(DeploymentPhaseContext context, ComponentConfiguration componentConfiguration, ViewDescription description, ViewConfiguration configuration) throws DeploymentUnitProcessingException {
    final StatefulComponentDescription statefulComponentDescription = (StatefulComponentDescription) componentConfiguration.getComponentDescription();
    final Collection<StatefulRemoveMethod> removeMethods = statefulComponentDescription.getRemoveMethods();
    if (removeMethods.isEmpty()) {
      return;
    }
    for (final Method viewMethod : configuration.getProxyFactory().getCachedMethods()) {
      final MethodIdentifier viewMethodIdentifier = MethodIdentifier.getIdentifierForMethod(viewMethod);
      for (final StatefulRemoveMethod removeMethod : removeMethods) {
        if (removeMethod.methodIdentifier.equals(viewMethodIdentifier)) {
          //we do not want to add this if it is the Ejb(Local)Object.remove() method, as that is handed elsewhere
          final boolean object = EJBObject.class.isAssignableFrom(configuration.getViewClass()) || EJBLocalObject.class.isAssignableFrom(configuration.getViewClass());
          if (!object || !viewMethodIdentifier.getName().equals("remove") || viewMethodIdentifier.getParameterTypes().length != 0) {
            configuration.addViewInterceptor(viewMethod, new ImmediateInterceptorFactory(new StatefulRemoveInterceptor(removeMethod.retainIfException)), InterceptorOrder.View.SESSION_REMOVE_INTERCEPTOR);
          }
          break;
        }
      }
    }
  }
});
origin: wildfly/wildfly

public void configure(final DeploymentPhaseContext context, final ComponentConfiguration componentConfiguration, final ViewDescription description, final ViewConfiguration configuration) throws DeploymentUnitProcessingException {
  // Create method indexes
  final DeploymentReflectionIndex reflectionIndex = context.getDeploymentUnit().getAttachment(REFLECTION_INDEX);
  final List<Method> methods = configuration.getProxyFactory().getCachedMethods();
  for (final Method method : methods) {
    MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(method);
    Method componentMethod = ClassReflectionIndexUtil.findMethod(reflectionIndex, componentConfiguration.getComponentClass(), methodIdentifier);
    if (componentMethod == null && method.getDeclaringClass().isInterface() && (method.getModifiers() & (ABSTRACT | PUBLIC | STATIC)) == PUBLIC) {
      // no component method and the interface method is defaulted, so we really do want to invoke on the interface method
      componentMethod = method;
    }
    if (componentMethod != null) {
      if ((BRIDGE & componentMethod.getModifiers()) != 0) {
        Method other = findRealMethodForBridgeMethod(componentMethod, componentConfiguration, reflectionIndex, methodIdentifier);
        //try and find the non-bridge method to delegate to
        if(other != null) {
            componentMethod = other;
        }
      }
      configuration.addViewInterceptor(method, new ImmediateInterceptorFactory(new ComponentDispatcherInterceptor(componentMethod)), InterceptorOrder.View.COMPONENT_DISPATCHER);
      configuration.addClientInterceptor(method, CLIENT_DISPATCHER_INTERCEPTOR_FACTORY, InterceptorOrder.Client.CLIENT_DISPATCHER);
      configuration.getViewToComponentMethodMap().put(method, componentMethod);
    }
  }
  configuration.addClientPostConstructInterceptor(Interceptors.getTerminalInterceptorFactory(), InterceptorOrder.ClientPostConstruct.TERMINAL_INTERCEPTOR);
  configuration.addClientPreDestroyInterceptor(Interceptors.getTerminalInterceptorFactory(), InterceptorOrder.ClientPreDestroy.TERMINAL_INTERCEPTOR);
}
origin: wildfly/wildfly

final Collection<Method> methods = MethodResolutionUtils.resolveMethods(method.getMethodName(), method.getMethodParams(), componentClass, deploymentReflectionIndex);
for(final Method m : methods ) {
  description.addAsynchronousMethod(MethodIdentifier.getIdentifierForMethod(m));
origin: wildfly/wildfly

final List<InterceptorBindingMetaData> methodBindings = entry.getValue();
boolean totalOrder = methodLevelAbsoluteOrder.containsKey(method);
final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(method);
origin: wildfly/wildfly

final List<InterceptorBindingMetaData> methodBindings = entry.getValue();
boolean totalOrder = methodLevelAbsoluteOrder.containsKey(method);
final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(method);
origin: wildfly/wildfly

for(final Method method : methods) {
  final Boolean retainIfException = removeMethod.getRetainIfException();
  final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(method);
  if(retainIfException == null) {
for(final Method method : methods) {
  final Boolean retainIfException = removeMethod.getRetainIfException();
  final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(method);
  if(retainIfException == null) {
origin: wildfly/wildfly

protected boolean createPermissions(final EjbJaccConfig ejbJaccConfig, final EJBComponentDescription description, final EJBViewConfiguration ejbViewConfiguration,
                 final Method viewMethod, final DeploymentReflectionIndex index, final ApplicableMethodInformation<EJBMethodSecurityAttribute> permissions) {
  MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(viewMethod);
  EJBMethodSecurityAttribute ejbMethodSecurityMetaData = permissions.getViewAttribute(ejbViewConfiguration.getMethodIntf(), viewMethod);
  if (ejbMethodSecurityMetaData == null) {
    if (classMethod != null) {
      methodIdentifier = MethodIdentifier.getIdentifierForMethod(classMethod);
origin: wildfly/wildfly

protected void handleDeploymentDescriptor(final DeploymentUnit deploymentUnit, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final SessionBeanComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
  if (componentConfiguration.getDescriptorData() == null) {
    return;
  }
  SessionBeanMetaData sessionBeanMetaData = componentConfiguration.getDescriptorData();
  if (sessionBeanMetaData instanceof SessionBean31MetaData) {
    SessionBean31MetaData descriptor = (SessionBean31MetaData) sessionBeanMetaData;
    //handle lock
    if (descriptor.getLockType() != null) {
      componentConfiguration.setBeanLevelLockType(componentConfiguration.getEJBClassName(), descriptor.getLockType());
    }
    //handle access timeout
    if (descriptor.getAccessTimeout() != null) {
      componentConfiguration.setBeanLevelAccessTimeout(componentConfiguration.getEJBClassName(), new AccessTimeoutDetails(descriptor.getAccessTimeout().getTimeout(), descriptor.getAccessTimeout().getUnit()));
    }
    final ConcurrentMethodsMetaData methods = descriptor.getConcurrentMethods();
    if (methods != null) {
      for (final ConcurrentMethodMetaData method : methods) {
        final Method realMethod = resolveMethod(deploymentReflectionIndex, componentClass, componentClass, method.getMethod());
        final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifierForMethod(realMethod);
        if (method.getLockType() != null) {
          componentConfiguration.setLockType(method.getLockType(), methodIdentifier);
        }
        if (method.getAccessTimeout() != null) {
          componentConfiguration.setAccessTimeout(new AccessTimeoutDetails(method.getAccessTimeout().getTimeout(), method.getAccessTimeout().getUnit()), methodIdentifier);
        }
      }
    }
  }
}
origin: org.jboss.as/jboss-as-ejb3

protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final StatefulComponentDescription componentConfiguration) throws DeploymentUnitProcessingException {
  final RuntimeAnnotationInformation<Boolean> removeMethods = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, Remove.class);
  for (Map.Entry<Method, List<Boolean>> entry : removeMethods.getMethodAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      final Boolean retainIfException = entry.getValue().get(0);
      final MethodIdentifier removeMethodIdentifier = MethodIdentifier.getIdentifierForMethod(entry.getKey());
      componentConfiguration.addRemoveMethod(removeMethodIdentifier, retainIfException);
    }
  }
}
org.jboss.invocation.proxyMethodIdentifiergetIdentifierForMethod

Javadoc

Get an identifier for the given reflection method.

Popular methods of MethodIdentifier

  • getIdentifier
    Construct a new instance using string names for the return and parameter types.
  • getName
    Get the method name.
  • getParameterTypes
    Get the parameter type names, as strings.
  • equals
    Determine whether this object is equal to another.
  • getReturnType
    Get the method return type name, as a string.
  • hashCode
    Get the hash code for this method identifier. The hash code is equal to: n * 7 + (r * 7 + a) whe
  • <init>
  • calculateHash
  • namesOf
  • typesOf

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • JLabel (javax.swing)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Top Vim 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