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

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

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

origin: wildfly/wildfly

private EJBBusinessMethod getEJBBusinessMethod(final MethodIdentifier method) {
  final ClassLoader classLoader = this.getComponentClass().getClassLoader();
  final String methodName = method.getName();
  final String[] types = method.getParameterTypes();
  if (types == null || types.length == 0) {
    return new EJBBusinessMethod(methodName);
  }
  Class<?>[] paramTypes = new Class<?>[types.length];
  int i = 0;
  for (String type : types) {
    try {
      paramTypes[i++] = PrimitiveClassLoaderUtil.loadClass(type, classLoader);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
  return new EJBBusinessMethod(methodName, paramTypes);
}
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

final EJBMethodPermission permission = new EJBMethodPermission(description.getEJBName(), methodIdentifier.getName(), interfaceType.name(), methodIdentifier.getParameterTypes());
origin: org.jboss.as/jboss-as-server

/**
 * Get a method declared on this object.
 *
 * @param methodIdentifier the method identifier
 * @return the method, or {@code null} if no method of that description exists
 */
public Method getMethod(MethodIdentifier methodIdentifier) {
  final Map<ParamNameList, Map<String, Method>> nameMap = methodsByTypeName.get(methodIdentifier.getName());
  if (nameMap == null) {
    return null;
  }
  final Map<String, Method> paramsMap = nameMap.get(createParamNameList(methodIdentifier.getParameterTypes()));
  if (paramsMap == null) {
    return null;
  }
  return paramsMap.get(methodIdentifier.getReturnType());
}
origin: org.wildfly.core/wildfly-server

/**
 * Get a method declared on this object.
 *
 * @param methodIdentifier the method identifier
 * @return the method, or {@code null} if no method of that description exists
 */
public Method getMethod(MethodIdentifier methodIdentifier) {
  final Map<ParamNameList, Map<String, Method>> nameMap = methodsByTypeName.get(methodIdentifier.getName());
  if (nameMap == null) {
    return null;
  }
  final Map<String, Method> paramsMap = nameMap.get(createParamNameList(methodIdentifier.getParameterTypes()));
  if (paramsMap == null) {
    return null;
  }
  return paramsMap.get(methodIdentifier.getReturnType());
}
origin: wildfly/wildfly-core

/**
 * Get a method declared on this object.
 *
 * @param methodIdentifier the method identifier
 * @return the method, or {@code null} if no method of that description exists
 */
public Method getMethod(MethodIdentifier methodIdentifier) {
  final Map<ParamNameList, Map<String, Method>> nameMap = methodsByTypeName.get(methodIdentifier.getName());
  if (nameMap == null) {
    return null;
  }
  final Map<String, Method> paramsMap = nameMap.get(createParamNameList(methodIdentifier.getParameterTypes()));
  if (paramsMap == null) {
    return null;
  }
  return paramsMap.get(methodIdentifier.getReturnType());
}
origin: org.jboss.as/jboss-as-ejb3

private void processTransactionAttributeAnnotation(final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, MethodIntf methodIntf, final EJBComponentDescription componentConfiguration) {
  final RuntimeAnnotationInformation<TransactionAttributeType> data = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, TransactionAttribute.class);
  for (Map.Entry<String, List<TransactionAttributeType>> entry : data.getClassAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      //we can't specify both methodIntf and class name
      final String className = methodIntf == null ? entry.getKey() : null;
      componentConfiguration.getTransactionAttributes().setAttribute(methodIntf, className, entry.getValue().get(0));
    }
  }
  for (Map.Entry<Method, List<TransactionAttributeType>> entry : data.getMethodAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      final MethodIdentifier method = MethodIdentifier.getIdentifierForMethod(entry.getKey());
      componentConfiguration.getTransactionAttributes().setAttribute(methodIntf, entry.getValue().get(0), entry.getKey().getDeclaringClass().getName(), method.getName(), method.getParameterTypes());
    }
  }
}
origin: org.wildfly/wildfly-server

/**
 * Get a method declared on this object.
 *
 * @param methodIdentifier the method identifier
 * @return the method, or {@code null} if no method of that description exists
 */
public Method getMethod(MethodIdentifier methodIdentifier) {
  final Map<ParamNameList, Map<String, Method>> nameMap = methodsByTypeName.get(methodIdentifier.getName());
  if (nameMap == null) {
    return null;
  }
  final Map<String, Method> paramsMap = nameMap.get(createParamNameList(methodIdentifier.getParameterTypes()));
  if (paramsMap == null) {
    return null;
  }
  return paramsMap.get(methodIdentifier.getReturnType());
}
origin: org.jboss.as/jboss-as-ejb3

private void processTransactionTimeoutAnnotation(final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, MethodIntf methodIntf, final EJBComponentDescription componentConfiguration) {
  final RuntimeAnnotationInformation<Integer> data = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, TransactionTimeout.class);
  for (Map.Entry<String, List<Integer>> entry : data.getClassAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      //we can't specify both methodIntf and class name
      final String className = methodIntf == null ? entry.getKey() : null;
      componentConfiguration.getTransactionTimeouts().setAttribute(methodIntf, className, entry.getValue().get(0));
    }
  }
  for (Map.Entry<Method, List<Integer>> entry : data.getMethodAnnotations().entrySet()) {
    if (!entry.getValue().isEmpty()) {
      final MethodIdentifier method = MethodIdentifier.getIdentifierForMethod(entry.getKey());
      final String className = entry.getKey().getDeclaringClass().getName();
      componentConfiguration.getTransactionTimeouts().setAttribute(methodIntf, entry.getValue().get(0), className, method.getName(), method.getParameterTypes());
    }
  }
}
origin: org.jboss.as/jboss-as-ejb3

private boolean handlePermissions(String contextID, ComponentConfiguration componentConfiguration, ViewConfiguration viewConfiguration, DeploymentReflectionIndex deploymentReflectionIndex, String viewClassName, EJBViewDescription ejbViewDescription, Method viewMethod, ApplicableMethodInformation<EJBMethodSecurityAttribute> permissions, boolean annotations) {
  EJBMethodSecurityAttribute ejbMethodSecurityMetaData = permissions.getViewAttribute(ejbViewDescription.getMethodIntf(), viewMethod.getName(), MethodIdentifier.getIdentifierForMethod(viewMethod).getParameterTypes());
  final List<EJBMethodSecurityAttribute> allAttributes = new ArrayList<EJBMethodSecurityAttribute>();
  allAttributes.addAll(permissions.getAllAttributes(ejbViewDescription.getMethodIntf(), viewMethod.getDeclaringClass().getName(), viewMethod.getName(), MethodIdentifier.getIdentifierForMethod(viewMethod).getParameterTypes()));
    ejbMethodSecurityMetaData = permissions.getViewAttribute(MethodIntf.BEAN, viewMethod.getName(), MethodIdentifier.getIdentifierForMethod(viewMethod).getParameterTypes());
  allAttributes.addAll(permissions.getAllAttributes(MethodIntf.BEAN, viewMethod.getDeclaringClass().getName(), viewMethod.getName(), MethodIdentifier.getIdentifierForMethod(viewMethod).getParameterTypes()));
      ejbMethodSecurityMetaData = permissions.getAttribute(ejbViewDescription.getMethodIntf(), classMethod.getDeclaringClass().getName(), classMethod.getName(), MethodIdentifier.getIdentifierForMethod(classMethod).getParameterTypes());
      if (ejbMethodSecurityMetaData == null) {
        ejbMethodSecurityMetaData = permissions.getAttribute(MethodIntf.BEAN, classMethod.getDeclaringClass().getName(), classMethod.getName(), MethodIdentifier.getIdentifierForMethod(classMethod).getParameterTypes());
    allAttributes.addAll(permissions.getAllAttributes(ejbViewDescription.getMethodIntf(), classMethod.getDeclaringClass().getName(), classMethod.getName(), MethodIdentifier.getIdentifierForMethod(classMethod).getParameterTypes()));
    allAttributes.addAll(permissions.getAllAttributes(MethodIntf.BEAN, classMethod.getDeclaringClass().getName(), classMethod.getName(), MethodIdentifier.getIdentifierForMethod(classMethod).getParameterTypes()));
origin: org.jboss.as/jboss-as-ejb3

private EJBBusinessMethod getEJBBusinessMethod(final MethodIdentifier method) {
  final ClassLoader classLoader = this.getComponentClass().getClassLoader();
  final String methodName = method.getName();
  final String[] types = method.getParameterTypes();
  if (types == null || types.length == 0) {
    return new EJBBusinessMethod(methodName);
  }
  Class<?>[] paramTypes = new Class<?>[types.length];
  int i = 0;
  for (String type : types) {
    try {
      paramTypes[i++] = PrimitiveClassLoaderUtil.loadClass(type, classLoader);
    } catch (ClassNotFoundException e) {
      throw new RuntimeException(e);
    }
  }
  return new EJBBusinessMethod(methodName, paramTypes);
}
origin: org.jboss.as/jboss-as-ejb3

@Override
protected void handleAnnotations(final DeploymentUnit deploymentUnit, final EEApplicationClasses applicationClasses, final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> componentClass, final EJBComponentDescription description) throws DeploymentUnitProcessingException {
  final RuntimeAnnotationInformation<Boolean> permitData = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, PermitAll.class);
  for (Map.Entry<String, List<Boolean>> entry : permitData.getClassAnnotations().entrySet()) {
    description.getAnnotationMethodPermissions().setAttribute(null, entry.getKey(), EJBMethodSecurityAttribute.permitAll());
  }
  for (Map.Entry<Method, List<Boolean>> entry : permitData.getMethodAnnotations().entrySet()) {
    final Method method = entry.getKey();
    final MethodIdentifier identifier = MethodIdentifier.getIdentifierForMethod(method);
    description.getAnnotationMethodPermissions().setAttribute(null, EJBMethodSecurityAttribute.permitAll(), method.getDeclaringClass().getName(), method.getName(), identifier.getParameterTypes());
  }
  final RuntimeAnnotationInformation<String[]> data = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, RolesAllowed.class);
  for (Map.Entry<String, List<String[]>> entry : data.getClassAnnotations().entrySet()) {
    description.getAnnotationMethodPermissions().setAttribute(null, entry.getKey(), EJBMethodSecurityAttribute.rolesAllowed(new HashSet<String>(Arrays.<String>asList(entry.getValue().get(0)))));
  }
  for (Map.Entry<Method, List<String[]>> entry : data.getMethodAnnotations().entrySet()) {
    final Method method = entry.getKey();
    final MethodIdentifier identifier = MethodIdentifier.getIdentifierForMethod(method);
    description.getAnnotationMethodPermissions().setAttribute(null, EJBMethodSecurityAttribute.rolesAllowed(new HashSet<String>(Arrays.<String>asList(entry.getValue().get(0)))), method.getDeclaringClass().getName(), method.getName(), identifier.getParameterTypes());
  }
  final RuntimeAnnotationInformation<Boolean> denyData = MethodAnnotationAggregator.runtimeAnnotationInformation(componentClass, applicationClasses, deploymentReflectionIndex, DenyAll.class);
  for (Map.Entry<String, List<Boolean>> entry : denyData.getClassAnnotations().entrySet()) {
    description.getAnnotationMethodPermissions().setAttribute(null, entry.getKey(), EJBMethodSecurityAttribute.denyAll());
  }
  for (Map.Entry<Method, List<Boolean>> entry : denyData.getMethodAnnotations().entrySet()) {
    final Method method = entry.getKey();
    final MethodIdentifier identifier = MethodIdentifier.getIdentifierForMethod(method);
    description.getAnnotationMethodPermissions().setAttribute(null, EJBMethodSecurityAttribute.denyAll(), method.getDeclaringClass().getName(), method.getName(), identifier.getParameterTypes());
  }
}
origin: org.jboss.as/jboss-as-ejb3

EJBMethodSecurityAttribute ejbMethodSecurityMetaData = permissions.getViewAttribute(ejbViewConfiguration.getMethodIntf(), viewMethod.getName(), methodIdentifier.getParameterTypes());
  ejbMethodSecurityMetaData = permissions.getViewAttribute(MethodIntf.BEAN, viewMethod.getName(), methodIdentifier.getParameterTypes());
    methodIdentifier = methodIdentifier.getIdentifierForMethod(classMethod);
    ejbMethodSecurityMetaData = permissions.getAttribute(ejbViewConfiguration.getMethodIntf(), classMethod.getDeclaringClass().getName(), classMethod.getName(), methodIdentifier.getParameterTypes());
    if (ejbMethodSecurityMetaData == null) {
      ejbMethodSecurityMetaData = permissions.getAttribute(MethodIntf.BEAN, classMethod.getDeclaringClass().getName(), classMethod.getName(), methodIdentifier.getParameterTypes());
  final EJBMethodPermission permission = new EJBMethodPermission(description.getEJBName(), methodIdentifier.getName(), interfaceType.name(), methodIdentifier.getParameterTypes());
origin: org.jboss.as/jboss-as-ejb3

  @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;
        }
      }
    }
  }
});
org.jboss.invocation.proxyMethodIdentifiergetParameterTypes

Javadoc

Get the parameter type names, as strings.

Popular methods of MethodIdentifier

  • getIdentifier
    Construct a new instance using string names for the return and parameter types.
  • getIdentifierForMethod
    Get an identifier for the given reflection method.
  • getName
    Get the method name.
  • 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

  • Finding current android device location
  • getSystemService (Context)
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • 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 (
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • From CI to AI: The AI layer in your organization
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