congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Executable.getParameterTypes
Code IndexAdd Tabnine to your IDE (free)

How to use
getParameterTypes
method
in
java.lang.reflect.Executable

Best Java code snippets using java.lang.reflect.Executable.getParameterTypes (Showing top 20 results out of 315)

origin: spring-projects/spring-framework

/**
 * Return the type of the method/constructor parameter.
 * @return the parameter type (never {@code null})
 */
public Class<?> getParameterType() {
  Class<?> paramType = this.parameterType;
  if (paramType == null) {
    if (this.parameterIndex < 0) {
      Method method = getMethod();
      paramType = (method != null ? method.getReturnType() : void.class);
    }
    else {
      paramType = this.executable.getParameterTypes()[this.parameterIndex];
    }
    this.parameterType = paramType;
  }
  return paramType;
}
origin: spring-projects/spring-framework

/**
 * Whether to raise a fatal bind exception on validation errors.
 * @param parameter the method parameter declaration
 * @return {@code true} if the next method parameter is not of type {@link Errors}
 * @since 5.0
 */
protected boolean isBindExceptionRequired(MethodParameter parameter) {
  int i = parameter.getParameterIndex();
  Class<?>[] paramTypes = parameter.getExecutable().getParameterTypes();
  boolean hasBindingResult = (paramTypes.length > (i + 1) && Errors.class.isAssignableFrom(paramTypes[i + 1]));
  return !hasBindingResult;
}
origin: spring-projects/spring-framework

private boolean hasErrorsArgument(MethodParameter parameter) {
  int i = parameter.getParameterIndex();
  Class<?>[] paramTypes = parameter.getExecutable().getParameterTypes();
  return (paramTypes.length > i + 1 && Errors.class.isAssignableFrom(paramTypes[i + 1]));
}
origin: spring-projects/spring-framework

/**
 * Whether to raise a fatal bind exception on validation errors.
 * @param binder the data binder used to perform data binding
 * @param parameter the method parameter descriptor
 * @return {@code true} if the next method argument is not of type {@link Errors}
 * @since 4.1.5
 */
protected boolean isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter) {
  int i = parameter.getParameterIndex();
  Class<?>[] paramTypes = parameter.getExecutable().getParameterTypes();
  boolean hasBindingResult = (paramTypes.length > (i + 1) && Errors.class.isAssignableFrom(paramTypes[i + 1]));
  return !hasBindingResult;
}
origin: org.springframework/spring-core

/**
 * Return the type of the method/constructor parameter.
 * @return the parameter type (never {@code null})
 */
public Class<?> getParameterType() {
  Class<?> paramType = this.parameterType;
  if (paramType == null) {
    if (this.parameterIndex < 0) {
      Method method = getMethod();
      paramType = (method != null ? method.getReturnType() : void.class);
    }
    else {
      paramType = this.executable.getParameterTypes()[this.parameterIndex];
    }
    this.parameterType = paramType;
  }
  return paramType;
}
origin: org.springframework/spring-web

/**
 * Whether to raise a fatal bind exception on validation errors.
 * @param parameter the method parameter declaration
 * @return {@code true} if the next method parameter is not of type {@link Errors}
 * @since 5.0
 */
protected boolean isBindExceptionRequired(MethodParameter parameter) {
  int i = parameter.getParameterIndex();
  Class<?>[] paramTypes = parameter.getExecutable().getParameterTypes();
  boolean hasBindingResult = (paramTypes.length > (i + 1) && Errors.class.isAssignableFrom(paramTypes[i + 1]));
  return !hasBindingResult;
}
origin: org.springframework/spring-webmvc

/**
 * Whether to raise a fatal bind exception on validation errors.
 * @param binder the data binder used to perform data binding
 * @param parameter the method parameter descriptor
 * @return {@code true} if the next method argument is not of type {@link Errors}
 * @since 4.1.5
 */
protected boolean isBindExceptionRequired(WebDataBinder binder, MethodParameter parameter) {
  int i = parameter.getParameterIndex();
  Class<?>[] paramTypes = parameter.getExecutable().getParameterTypes();
  boolean hasBindingResult = (paramTypes.length > (i + 1) && Errors.class.isAssignableFrom(paramTypes[i + 1]));
  return !hasBindingResult;
}
origin: spring-projects/spring-framework

public MethodParameterTypeProvider(MethodParameter methodParameter) {
  this.methodName = (methodParameter.getMethod() != null ? methodParameter.getMethod().getName() : null);
  this.parameterTypes = methodParameter.getExecutable().getParameterTypes();
  this.declaringClass = methodParameter.getDeclaringClass();
  this.parameterIndex = methodParameter.getParameterIndex();
  this.methodParameter = methodParameter;
}
origin: org.junit.jupiter/junit-jupiter-params

private static boolean isNotPrivateAndAcceptsSingleStringArgument(Executable executable) {
  return isNotPrivate(executable) //
      && (executable.getParameterCount() == 1) //
      && (executable.getParameterTypes()[0] == String.class);
}
origin: spring-projects/spring-framework

/**
 * Create a new descriptor for a method or constructor parameter.
 * @param methodParameter the MethodParameter to wrap
 * @param required whether the dependency is required
 * @param eager whether this dependency is 'eager' in the sense of
 * eagerly resolving potential target beans for type matching
 */
public DependencyDescriptor(MethodParameter methodParameter, boolean required, boolean eager) {
  super(methodParameter);
  this.declaringClass = methodParameter.getDeclaringClass();
  if (methodParameter.getMethod() != null) {
    this.methodName = methodParameter.getMethod().getName();
  }
  this.parameterTypes = methodParameter.getExecutable().getParameterTypes();
  this.parameterIndex = methodParameter.getParameterIndex();
  this.containingClass = methodParameter.getContainingClass();
  this.required = required;
  this.eager = eager;
}
origin: org.springframework/spring-core

public MethodParameterTypeProvider(MethodParameter methodParameter) {
  this.methodName = (methodParameter.getMethod() != null ? methodParameter.getMethod().getName() : null);
  this.parameterTypes = methodParameter.getExecutable().getParameterTypes();
  this.declaringClass = methodParameter.getDeclaringClass();
  this.parameterIndex = methodParameter.getParameterIndex();
  this.methodParameter = methodParameter;
}
origin: oblac/jodd

/**
 * Takes given parameters references and returns reference set for given method or constructor.
 */
public BeanReferences[] resolveReferenceFromValues(final Executable methodOrCtor, final String... parameterReferences) {
  BeanReferences[] references = convertRefToReferences(parameterReferences);
  if (references == null || references.length == 0) {
    references = buildDefaultReferences(methodOrCtor);
  }
  if (methodOrCtor.getParameterTypes().length != references.length) {
    throw new PetiteException("Different number of method parameters and references for: " +
      methodOrCtor.getDeclaringClass().getName() + '#' + methodOrCtor.getName());
  }
  removeAllDuplicateNames(references);
  return references;
}
origin: oblac/jodd

private BeanReferences[] updateReferencesWithDefaultsIfNeeded(final Executable methodOrCtor, BeanReferences[] references) {
  BeanReferences[] defaultReferences = buildDefaultReferences(methodOrCtor);
  if (references == null || references.length == 0) {
    references = defaultReferences;
  }
  if (methodOrCtor.getParameterTypes().length != references.length) {
    throw new PetiteException(
      "Different number of parameters and references for: " + methodOrCtor.getName());
  }
  // apply default parameters
  for (int i = 0; i < references.length; i++) {
    BeanReferences parameterReferences = references[i];
    if (parameterReferenceIsNotSet(parameterReferences)) {
      references[i] = defaultReferences[i];
    }
  }
  return references;
}
origin: org.springframework/spring-beans

/**
 * Create a new descriptor for a method or constructor parameter.
 * @param methodParameter the MethodParameter to wrap
 * @param required whether the dependency is required
 * @param eager whether this dependency is 'eager' in the sense of
 * eagerly resolving potential target beans for type matching
 */
public DependencyDescriptor(MethodParameter methodParameter, boolean required, boolean eager) {
  super(methodParameter);
  this.declaringClass = methodParameter.getDeclaringClass();
  if (methodParameter.getMethod() != null) {
    this.methodName = methodParameter.getMethod().getName();
  }
  this.parameterTypes = methodParameter.getExecutable().getParameterTypes();
  this.parameterIndex = methodParameter.getParameterIndex();
  this.containingClass = methodParameter.getContainingClass();
  this.required = required;
  this.eager = eager;
}
origin: oblac/jodd

final Class[] paramTypes = methodOrCtor.getParameterTypes();
final BeanReferences[] references = new BeanReferences[paramTypes.length];
origin: spring-projects/spring-framework

BeanDefinitionValueResolver valueResolver =
    new BeanDefinitionValueResolver(this.beanFactory, beanName, mbd, converter);
Class<?>[] paramTypes = executable.getParameterTypes();
origin: org.springframework/spring-beans

BeanDefinitionValueResolver valueResolver =
    new BeanDefinitionValueResolver(this.beanFactory, beanName, mbd, converter);
Class<?>[] paramTypes = executable.getParameterTypes();
origin: org.hibernate.validator/hibernate-validator

protected ExecutableConstraintMappingContextImpl(TypeConstraintMappingContextImpl<?> typeContext, Executable executable) {
  this.typeContext = typeContext;
  this.executable = executable;
  this.parameterContexts = new ParameterConstraintMappingContextImpl[executable.getParameterTypes().length];
}
origin: com.oracle.truffle/truffle-api

protected SingleMethodDesc(Executable executable) {
  this.varArgs = executable.isVarArgs();
  this.parameterTypes = executable.getParameterTypes();
  this.genericParameterTypes = executable.getGenericParameterTypes();
}
origin: org.hibernate.validator/hibernate-validator

public ExecutableFormatter(Executable executable) {
  String name = ExecutableHelper.getSimpleName( executable );
  if ( executable instanceof Method ) {
    name = executable.getDeclaringClass().getSimpleName() + "#" + name;
  }
  Class<?>[] parameterTypes = executable.getParameterTypes();
  this.stringRepresentation = ExecutableHelper.getExecutableAsString( name, parameterTypes );
}
java.lang.reflectExecutablegetParameterTypes

Popular methods of Executable

  • getParameters
  • getDeclaringClass
  • getName
  • getParameterCount
  • toGenericString
  • getGenericParameterTypes
  • getModifiers
  • getParameterAnnotations
  • getAnnotation
  • getAnnotations
  • isAnnotationPresent
  • isVarArgs
  • isAnnotationPresent,
  • isVarArgs,
  • getAnnotatedParameterTypes,
  • getAnnotatedReturnType,
  • getAnnotatedReceiverType,
  • getGenericExceptionTypes,
  • isSynthetic,
  • <init>,
  • getAnnotatedExceptionTypes

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • getSharedPreferences (Context)
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • SocketTimeoutException (java.net)
    This exception is thrown when a timeout expired on a socket read or accept operation.
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • JCheckBox (javax.swing)
  • JList (javax.swing)
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now