groovy.lang.MetaClass.getMethods()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(117)

本文整理了Java中groovy.lang.MetaClass.getMethods()方法的一些代码示例,展示了MetaClass.getMethods()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaClass.getMethods()方法的具体详情如下:
包路径:groovy.lang.MetaClass
类名称:MetaClass
方法名:getMethods

MetaClass.getMethods介绍

[英]Retrieves a list of MetaMethods held by the class
[中]检索该类持有的元方法列表

代码示例

代码示例来源:origin: org.codehaus.groovy/groovy

public List<MetaMethod> getMethods() {
  return delegate.getMethods();
}

代码示例来源:origin: org.codehaus.groovy/groovy

@Override
public List<MetaMethod> getMethods() {
  final Object owner = getOwner();
  final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
  return ownerMetaClass.getMethods();
}

代码示例来源:origin: org.codehaus.groovy/groovy

List<MetaMethod> methods = new ArrayList<MetaMethod>(ci.getMetaClass().getMethods());
methods.addAll(ci.getMetaClass().getMetaMethods());
List<MetaMethod> sugg = rankMethods(methodName,arguments,methods);

代码示例来源:origin: org.codehaus.groovy/groovy

for (MetaMethod method : metaClass.getMethods()) {
  final int mod = method.getModifiers();

代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal

public List getMethods() {
  return delegate.getMethods();
}

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

public List<MetaMethod> getMethods() {
  return delegate.getMethods();
}

代码示例来源:origin: org.kohsuke.droovy/groovy

public List getMethods() {
  return delegate.getMethods();
}

代码示例来源:origin: org.gmock/gmock

public List getMethods() {
  return adaptee.getMethods();
}

代码示例来源:origin: org.codehaus.groovy/groovy-jdk14

public List<MetaMethod> getMethods() {
  return delegate.getMethods();
}

代码示例来源:origin: org.kohsuke.droovy/groovy

public List getMethods() {
  final Object owner = getOwner();
  final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
  return ownerMetaClass.getMethods();
}

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

@Override
public List<MetaMethod> getMethods() {
  final Object owner = getOwner();
  final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
  return ownerMetaClass.getMethods();
}

代码示例来源:origin: org.codehaus.groovy/groovy-jdk14

@Override
public List<MetaMethod> getMethods() {
  final Object owner = getOwner();
  final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
  return ownerMetaClass.getMethods();
}

代码示例来源:origin: org.gradle/gradle-core

@Nullable
private MetaMethod findMethodMissingMethod(MetaClass metaClass) {
  if (metaClass instanceof MetaClassImpl) {
    // Reach into meta class to avoid lookup
    try {
      return (MetaMethod) MISSING_METHOD_METHOD.get(metaClass);
    } catch (IllegalAccessException e) {
      throw UncheckedException.throwAsUncheckedException(e);
    }
  }
  // Query the declared methods of the meta class
  for (MetaMethod method : metaClass.getMethods()) {
    if (method.getName().equals("methodMissing") && method.getParameterTypes().length == 2) {
      return method;
    }
  }
  return null;
}

代码示例来源:origin: org.gradle/gradle-core

@Nullable
private MetaMethod findGetPropertyMissingMethod(MetaClass metaClass) {
  if (metaClass instanceof MetaClassImpl) {
    // Reach into meta class to avoid lookup
    try {
      return (MetaMethod) MISSING_PROPERTY_GET_METHOD.get(metaClass);
    } catch (IllegalAccessException e) {
      throw UncheckedException.throwAsUncheckedException(e);
    }
  }
  // Query the declared methods of the meta class
  for (MetaMethod method : metaClass.getMethods()) {
    if (method.getName().equals("propertyMissing") && method.getParameterTypes().length == 1) {
      return method;
    }
  }
  return null;
}

代码示例来源:origin: org.gradle/gradle-core

@Nullable
private MetaMethod findSetPropertyMissingMethod(MetaClass metaClass) {
  if (metaClass instanceof MetaClassImpl) {
    // Reach into meta class to avoid lookup
    try {
      return (MetaMethod) MISSING_PROPERTY_SET_METHOD.get(metaClass);
    } catch (IllegalAccessException e) {
      throw UncheckedException.throwAsUncheckedException(e);
    }
  }
  // Query the declared methods of the meta class
  for (MetaMethod method : metaClass.getMethods()) {
    if (method.getName().equals("propertyMissing") && method.getParameterTypes().length == 2) {
      return method;
    }
  }
  return null;
}

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

List<MetaMethod> methods = new ArrayList<MetaMethod>(ci.getMetaClass().getMethods());
methods.addAll(ci.getMetaClass().getMetaMethods());
List<MetaMethod> sugg = rankMethods(methodName,arguments,methods);

代码示例来源:origin: org.kohsuke.droovy/groovy

for (MetaMethod method : (List<MetaMethod>)metaClass.getMethods()) {
  final int mod = method.getModifiers();

代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm

for (MetaMethod method : metaClass.getMethods()) {
  final int mod = method.getModifiers();

代码示例来源:origin: org.codehaus.groovy/groovy-jdk14

for (MetaMethod method : (List<MetaMethod>)metaClass.getMethods()) {
  final int mod = method.getModifiers();

相关文章