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

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

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

origin: wildfly/wildfly

private void clearUnknownProperties(final DeploymentReflectionIndex reflectionIndex, final Class<?> dataSourceClass, final Map<String, String> props) {
  final Iterator<Map.Entry<String, String>> it = props.entrySet().iterator();
  while (it.hasNext()) {
    final Map.Entry<String, String> entry = it.next();
    String value = entry.getKey();
    if (value == null || "".equals(value)) {
      it.remove();
    } else {
      StringBuilder builder = new StringBuilder("set").append(entry.getKey());
      builder.setCharAt(3, Character.toUpperCase(entry.getKey().charAt(0)));
      final String methodName = builder.toString();
      final Class<?> paramType = value.getClass();
      final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, paramType);
      final Method setterMethod = ClassReflectionIndexUtil.findMethod(reflectionIndex, dataSourceClass, methodIdentifier);
      if (setterMethod == null) {
        it.remove();
        ConnectorLogger.DS_DEPLOYER_LOGGER.methodNotFoundOnDataSource(methodName, dataSourceClass);
      }
    }
  }
}
origin: wildfly/wildfly

private void setProperty(final DeploymentReflectionIndex deploymentReflectionIndex, final Class<?> dataSourceClass, final Map<String, String> properties, final String name, final Object value) {
  // Ignore defaulted values
  if (value == null || "".equals(value)) return;
  if (value instanceof Integer && ((Integer) value).intValue() == -1) return;
  StringBuilder builder = new StringBuilder("set").append(name);
  builder.setCharAt(3, Character.toUpperCase(name.charAt(0)));
  final String methodName = builder.toString();
  final Class<?> paramType = value.getClass();
  MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, paramType);
  Method setterMethod = ClassReflectionIndexUtil.findMethod(deploymentReflectionIndex, dataSourceClass, methodIdentifier);
  if (setterMethod != null) {
    properties.put(name, value.toString());
  } else if (paramType == Integer.class) {
    //if this is an Integer also look for int setters (WFLY-1364)
    methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, int.class);
    setterMethod = ClassReflectionIndexUtil.findMethod(deploymentReflectionIndex, dataSourceClass, methodIdentifier);
    if (setterMethod != null) {
      properties.put(name, value.toString());
    }
  } else if (paramType == Boolean.class) {
    methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, boolean.class);
    setterMethod = ClassReflectionIndexUtil.findMethod(deploymentReflectionIndex, dataSourceClass, methodIdentifier);
    if (setterMethod != null) {
      properties.put(name, value.toString());
    }
  }
}
origin: wildfly/wildfly

  private MethodIdentifier getMethodIdentifier(Type[] args, MethodInfo methodInfo){
    if (args.length == 0) {
      return MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name());
    } else {
      return MethodIdentifier.getIdentifier(methodInfo.returnType().name().toString(), methodInfo.name(), InvocationContext.class.getName());
    }
  }
}
origin: wildfly/wildfly

/**
 * Handles setting up the ejbCreate and ejbRemove methods  for stateless session beans and MDB's
 *
 * @param component       The component
 * @param module      The module
 * @param reflectionIndex The reflection index
 */
private void handleStatelessSessionBean(final EJBComponentDescription component, final Module module, final DeploymentReflectionIndex reflectionIndex) throws ClassNotFoundException, DeploymentUnitProcessingException {
  final Class<?> componentClass = ClassLoadingUtils.loadClass(component.getComponentClassName(), module);
  final MethodIdentifier ejbCreateId = MethodIdentifier.getIdentifier(void.class, "ejbCreate");
  final Method ejbCreate = ClassReflectionIndexUtil.findMethod(reflectionIndex, componentClass, ejbCreateId);
  if (ejbCreate != null) {
    final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
    builder.setPostConstruct(ejbCreateId);
    component.addInterceptorMethodOverride(ejbCreate.getDeclaringClass().getName(), builder.build());
  }
  final MethodIdentifier ejbRemoveId = MethodIdentifier.getIdentifier(void.class, "ejbRemove");
  final Method ejbRemove = ClassReflectionIndexUtil.findMethod(reflectionIndex, componentClass, ejbRemoveId);
  if (ejbRemove != null) {
    final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
    builder.setPreDestroy(ejbRemoveId);
    component.addInterceptorMethodOverride(ejbRemove.getDeclaringClass().getName(), builder.build());
  }
}
origin: wildfly/wildfly

private MethodIdentifier getMethodIdentifier(final AnnotationTarget target) {
  final MethodInfo methodInfo = MethodInfo.class.cast(target);
  final String[] args = new String[methodInfo.args().length];
  for (int i = 0; i < methodInfo.args().length; i++) {
    args[i] = methodInfo.args()[i].name().toString();
  }
  return MethodIdentifier.getIdentifier(methodInfo.returnType().name().toString(), methodInfo.name(), args);
}
origin: wildfly/wildfly

final MethodIdentifier ejbRemoveIdentifier = MethodIdentifier.getIdentifier(void.class, "ejbRemove");
final MethodIdentifier ejbActivateIdentifier = MethodIdentifier.getIdentifier(void.class, "ejbActivate");
final MethodIdentifier ejbPassivateIdentifier = MethodIdentifier.getIdentifier(void.class, "ejbPassivate");
origin: wildfly/wildfly

private void processAroundInvoke(final EEModuleDescription eeModuleDescription, final AnnotationTarget target) throws DeploymentUnitProcessingException {
  if (!(target instanceof MethodInfo)) {
    throw EeLogger.ROOT_LOGGER.methodOnlyAnnotation(AROUND_INVOKE_ANNOTATION_NAME);
  }
  final MethodInfo methodInfo = MethodInfo.class.cast(target);
  final ClassInfo classInfo = methodInfo.declaringClass();
  final EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString());
  final List<AnnotationInstance> classAroundInvokes = classInfo.annotations().get(AROUND_INVOKE_ANNOTATION_NAME);
  if(classAroundInvokes.size() > 1) {
    throw EeLogger.ROOT_LOGGER.aroundInvokeAnnotationUsedTooManyTimes(classInfo.name(), classAroundInvokes.size());
  }
  validateArgumentType(classInfo, methodInfo);
  InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder(classDescription.getInterceptorClassDescription());
  builder.setAroundInvoke(MethodIdentifier.getIdentifier(Object.class, methodInfo.name(), InvocationContext.class));
  classDescription.setInterceptorClassDescription(builder.build());
}
origin: wildfly/wildfly

final List<Method> viewMethods = viewConfiguration.getProxyFactory().getCachedMethods();
for (final Method method : viewMethods) {
  final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(method.getReturnType(), method.getName(), method.getParameterTypes());
  final List<InterceptorFactory> aroundInvokesApplicableForMethod = new ArrayList<InterceptorFactory>();
  final List<InterceptorFactory> aroundTimeoutsApplicableForMethod = new ArrayList<InterceptorFactory>();
origin: wildfly/wildfly

private void processAroundInvoke(final AnnotationTarget target, final EEModuleDescription eeModuleDescription) {
  if (!(target instanceof MethodInfo)) {
    throw EjbLogger.ROOT_LOGGER.annotationApplicableOnlyForMethods(AROUND_TIMEOUT_ANNOTATION_NAME.toString());
  }
  final MethodInfo methodInfo = MethodInfo.class.cast(target);
  final ClassInfo classInfo = methodInfo.declaringClass();
  final EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString());
  validateArgumentType(classInfo, methodInfo);
  final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder(classDescription.getInterceptorClassDescription());
  builder.setAroundTimeout(MethodIdentifier.getIdentifier(Object.class, methodInfo.name(), InvocationContext.class));
  classDescription.setInterceptorClassDescription(builder.build());
}
origin: wildfly/wildfly

MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
builder.setPostConstruct(methodIdentifier);
eeModuleDescription.addInterceptorMethodOverride(className, builder.build());
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
builder.setPreDestroy(methodIdentifier);
eeModuleDescription.addInterceptorMethodOverride(className, builder.build());
origin: wildfly/wildfly

final MethodIdentifier identifier = MethodIdentifier.getIdentifier(method.getReturnType(), method.getName(), method.getParameterTypes());
origin: wildfly/wildfly

  methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name());
} else {
  methodIdentifier = MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name(), InvocationContext.class);
origin: wildfly/wildfly

configuration.addComponentInterceptor(method, new ImmediateInterceptorFactory(new ManagedReferenceMethodInterceptor(BasicComponentInstance.INSTANCE_KEY, method)), InterceptorOrder.Component.TERMINAL_INTERCEPTOR);
final MethodIdentifier identifier = MethodIdentifier.getIdentifier(method.getReturnType(), method.getName(), method.getParameterTypes());
origin: wildfly/wildfly

final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = aroundInvoke.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(Object.class, methodName, InvocationContext.class);
builder.setAroundInvoke(methodIdentifier);
if (aroundInvoke.getClassName() == null || aroundInvoke.getClassName().isEmpty()) {
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = postConstruct.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
builder.setPostConstruct(methodIdentifier);
if (postConstruct.getClassName() == null || postConstruct.getClassName().isEmpty()) {
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
final String methodName = preDestroy.getMethodName();
final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
builder.setPreDestroy(methodIdentifier);
if (preDestroy.getClassName() == null || preDestroy.getClassName().isEmpty()) {
  final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
  final String methodName = prePassivate.getMethodName();
  final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
  builder.setPrePassivate(methodIdentifier);
  if (prePassivate.getClassName() == null || prePassivate.getClassName().isEmpty()) {
  final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
  final String methodName = postActivate.getMethodName();
  final MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName);
  builder.setPostActivate(methodIdentifier);
  if (postActivate.getClassName() == null || postActivate.getClassName().isEmpty()) {
origin: wildfly/wildfly

final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = aroundInvoke.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(Object.class, methodName, InvocationContext.class);
builder.setAroundInvoke(methodIdentifier);
if (aroundInvoke.getClassName() == null || aroundInvoke.getClassName().isEmpty()) {
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = aroundTimeout.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(Object.class, methodName, InvocationContext.class);
builder.setAroundTimeout(methodIdentifier);
if (aroundTimeout.getClassName() == null || aroundTimeout.getClassName().isEmpty()) {
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = postConstruct.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, InvocationContext.class);
builder.setPostConstruct(methodIdentifier);
if (postConstruct.getClassName() == null || postConstruct.getClassName().isEmpty()) {
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = preDestroy.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, InvocationContext.class);
builder.setPreDestroy(methodIdentifier);
if (preDestroy.getClassName() == null || preDestroy.getClassName().isEmpty()) {
final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder();
String methodName = prePassivate.getMethodName();
MethodIdentifier methodIdentifier = MethodIdentifier.getIdentifier(void.class, methodName, InvocationContext.class);
builder.setPrePassivate(methodIdentifier);
if (prePassivate.getClassName() == null || prePassivate.getClassName().isEmpty()) {
origin: org.wildfly/wildfly-ee

  private MethodIdentifier getMethodIdentifier(Type[] args, MethodInfo methodInfo){
    if (args.length == 0) {
      return MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name());
    } else {
      return MethodIdentifier.getIdentifier(methodInfo.returnType().name().toString(), methodInfo.name(), InvocationContext.class.getName());
    }
  }
}
origin: org.jboss.eap/wildfly-ee

  private MethodIdentifier getMethodIdentifier(Type[] args, MethodInfo methodInfo){
    if (args.length == 0) {
      return MethodIdentifier.getIdentifier(Void.TYPE, methodInfo.name());
    } else {
      return MethodIdentifier.getIdentifier(methodInfo.returnType().name().toString(), methodInfo.name(), InvocationContext.class.getName());
    }
  }
}
origin: org.jboss.eap/wildfly-ee

private MethodIdentifier getMethodIdentifier(final AnnotationTarget target) {
  final MethodInfo methodInfo = MethodInfo.class.cast(target);
  final String[] args = new String[methodInfo.args().length];
  for (int i = 0; i < methodInfo.args().length; i++) {
    args[i] = methodInfo.args()[i].name().toString();
  }
  return MethodIdentifier.getIdentifier(methodInfo.returnType().name().toString(), methodInfo.name(), args);
}
origin: org.jboss.as/jboss-as-ee

private void processAroundInvoke(final EEModuleDescription eeModuleDescription, final AnnotationTarget target) throws DeploymentUnitProcessingException {
  if (!(target instanceof MethodInfo)) {
    throw MESSAGES.methodOnlyAnnotation(AROUND_INVOKE_ANNOTATION_NAME);
  }
  final MethodInfo methodInfo = MethodInfo.class.cast(target);
  final ClassInfo classInfo = methodInfo.declaringClass();
  final EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString());
  validateArgumentType(classInfo, methodInfo);
  InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder(classDescription.getInterceptorClassDescription());
  builder.setAroundInvoke(MethodIdentifier.getIdentifier(Object.class, methodInfo.name(), InvocationContext.class));
  classDescription.setInterceptorClassDescription(builder.build());
}
origin: org.jboss.as/jboss-as-ejb3

private void processAroundInvoke(final AnnotationTarget target, final EEModuleDescription eeModuleDescription) {
  if (!(target instanceof MethodInfo)) {
    throw MESSAGES.annotationApplicableOnlyForMethods(AROUND_TIMEOUT_ANNOTATION_NAME.toString());
  }
  final MethodInfo methodInfo = MethodInfo.class.cast(target);
  final ClassInfo classInfo = methodInfo.declaringClass();
  final EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString());
  validateArgumentType(classInfo, methodInfo);
  final InterceptorClassDescription.Builder builder = InterceptorClassDescription.builder(classDescription.getInterceptorClassDescription());
  builder.setAroundTimeout(MethodIdentifier.getIdentifier(Object.class, methodInfo.name(), InvocationContext.class));
  classDescription.setInterceptorClassDescription(builder.build());
}
org.jboss.invocation.proxyMethodIdentifiergetIdentifier

Javadoc

Construct a new instance using class objects for the parameter types.

Popular methods of MethodIdentifier

  • getIdentifierForMethod
    Get an identifier for the given reflection method.
  • 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

  • Finding current android device location
  • notifyDataSetChanged (ArrayAdapter)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Best plugins for Eclipse
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