Tabnine Logo
ParameterNames.getParameterNames
Code IndexAdd Tabnine to your IDE (free)

How to use
getParameterNames
method
in
net.gdface.utils.ParameterNames

Best Java code snippets using net.gdface.utils.ParameterNames.getParameterNames (Showing top 4 results out of 315)

origin: com.gitee.l0km/common-base

  /**
   * {@link #getParameterNames(String, Class[])}不显式抛出异常版本
   * @param name
   * @param parameterTypes
   * @return
   */
  public final String[] getParameterNamesUnchecked(String name, Class<?>[] parameterTypes)  {
    try {
      return getParameterNames(name, parameterTypes);
    } catch (NoSuchMethodException e) {
      throw new RuntimeException(e);
    }
  }
}
origin: com.gitee.l0km/common-base

/**
 * 获取构造函数或方法的参数名<br>
 * {@code name}为{@code null}时,获取构造函数的参数名
 * @param name 方法名
 * @param parameterTypes 构造函数或方法的参数类型
 * @return
 * @throws NoSuchMethodException
 * @see #getParameterNames(String, Class)
 */
public final String[] getParameterNames(String name, Class<?>[] parameterTypes) throws NoSuchMethodException {
  if(null == clazz){
    return null;
  }
  try {
    Member member = null == name ? clazz.getConstructor(parameterTypes) : clazz.getMethod(name, parameterTypes);
    return getParameterNames(member);
  } catch (SecurityException e) {
    throw new IllegalArgumentException(e);
  }
}
/**
origin: com.gitee.l0km/common-base

/**
 * 获取构造函数或方法的参数名
 * @param member 构造函数或方法对象
 * @return
 * @see #getParameterNames(ChainedParamReader, Member)
 */
public final String[] getParameterNames(Member member) {
  if(null == clazz){
    return null;
  }
  Assert.notNull(member, "member");
  Class<?> declaringClass = member.getDeclaringClass();
  ChainedParamReader reader;
  if (null == (reader = readers.get(declaringClass))) {
    throw new IllegalArgumentException(String.format("%s is not member of %s", member.toString(),
        declaringClass.getName()));
  }
  return getParameterNames(reader, member);
}
 
origin: com.gitee.l0km/codegen-base

private static final Method getMethod(java.lang.reflect.Method[] methods, String signature) {
  Assert.notEmpty(signature, "signature");
  for (java.lang.reflect.Method m : methods) {
    if (Method.getSignature(m).equals(signature)){
      ParameterNames pt = new ParameterNames(m.getDeclaringClass());
      try {
        return new Method(m,pt.getParameterNames(m.getName(), m.getParameterTypes()));
      } catch (NoSuchMethodException e) {
        throw new RuntimeException(e);
      }
    }                
  }
  return null;
}
public final Method getMethod(Class<?> clazz, String signature) {
net.gdface.utilsParameterNamesgetParameterNames

Javadoc

获取构造函数或方法的参数名
name为 null时,获取构造函数的参数名

Popular methods of ParameterNames

  • getParameterNamesUnchecked
    #getParameterNames(String,Class[])不显式抛出异常版本
  • <init>

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • 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
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • JFrame (javax.swing)
  • CodeWhisperer alternatives
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