本文整理了Java中groovy.lang.MetaClass.getClassNode()
方法的一些代码示例,展示了MetaClass.getClassNode()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MetaClass.getClassNode()
方法的具体详情如下:
包路径:groovy.lang.MetaClass
类名称:MetaClass
方法名:getClassNode
[英]Obtains a reference to the original AST for the MetaClass if it is available at runtime
[中]获取元类的原始AST的引用(如果在运行时可用)
代码示例来源:origin: org.codehaus.groovy/groovy
public ClassNode getClassNode() {
return delegate.getClassNode();
}
代码示例来源:origin: org.codehaus.groovy/groovy
public ClassNode getClassNode() {
final Object owner = getOwner();
final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
return ownerMetaClass.getClassNode();
}
代码示例来源:origin: apache/groovy
private static void visit(Closure closure, CodeVisitorSupport visitor) {
if (closure != null) {
ClassNode classNode = closure.getMetaClass().getClassNode();
if (classNode == null) {
throw new GroovyRuntimeException(
"DataSet unable to evaluate expression. AST not available for closure: " + closure.getMetaClass().getTheClass().getName() +
". Is the source code on the classpath?");
}
List methods = classNode.getDeclaredMethods("doCall");
if (!methods.isEmpty()) {
MethodNode method = (MethodNode) methods.get(0);
if (method != null) {
Statement statement = method.getCode();
if (statement != null) {
statement.visit(visitor);
}
}
}
}
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
public ClassNode getClassNode() {
return delegate.getClassNode();
}
/* (non-Javadoc)
代码示例来源:origin: org.gperfutils/gprof
@Override
public ClassNode getClassNode() {
return adaptee.getClassNode();
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public ClassNode getClassNode() {
return delegate.getClassNode();
}
/* (non-Javadoc)
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public ClassNode getClassNode() {
return delegate.getClassNode();
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public ClassNode getClassNode() {
return delegate.getClassNode();
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
public ClassNode getClassNode() {
final Object owner = getOwner();
final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
return ownerMetaClass.getClassNode();
}
代码示例来源:origin: org.kohsuke.droovy/groovy
public ClassNode getClassNode() {
final Object owner = getOwner();
final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
return ownerMetaClass.getClassNode();
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
public ClassNode getClassNode() {
final Object owner = getOwner();
final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
return ownerMetaClass.getClassNode();
}
代码示例来源:origin: org.codehaus.groovy/groovy-all-minimal
private void visit(Closure closure, CodeVisitorSupport visitor) {
if (closure != null) {
ClassNode classNode = closure.getMetaClass().getClassNode();
if (classNode == null) {
throw new GroovyRuntimeException(
"Could not find the ClassNode for MetaClass: " + closure.getMetaClass());
}
List methods = classNode.getDeclaredMethods("doCall");
if (!methods.isEmpty()) {
MethodNode method = (MethodNode) methods.get(0);
if (method != null) {
Statement statement = method.getCode();
if (statement != null) {
statement.visit(visitor);
}
}
}
}
}
代码示例来源:origin: org.kohsuke.droovy/groovy
private void visit(Closure closure, CodeVisitorSupport visitor) {
if (closure != null) {
ClassNode classNode = closure.getMetaClass().getClassNode();
if (classNode == null) {
throw new GroovyRuntimeException(
"Could not find the ClassNode for MetaClass: " + closure.getMetaClass());
}
List methods = classNode.getDeclaredMethods("doCall");
if (!methods.isEmpty()) {
MethodNode method = (MethodNode) methods.get(0);
if (method != null) {
Statement statement = method.getCode();
if (statement != null) {
statement.visit(visitor);
}
}
}
}
}
代码示例来源:origin: org.codehaus.groovy/groovy-sql
private static void visit(Closure closure, CodeVisitorSupport visitor) {
if (closure != null) {
ClassNode classNode = closure.getMetaClass().getClassNode();
if (classNode == null) {
throw new GroovyRuntimeException(
"DataSet unable to evaluate expression. AST not available for closure: " + closure.getMetaClass().getTheClass().getName() +
". Is the source code on the classpath?");
}
List methods = classNode.getDeclaredMethods("doCall");
if (!methods.isEmpty()) {
MethodNode method = (MethodNode) methods.get(0);
if (method != null) {
Statement statement = method.getCode();
if (statement != null) {
statement.visit(visitor);
}
}
}
}
}
代码示例来源:origin: com.thinkaurelius.groovy-shaded-asm/groovy-shaded-asm
private void visit(Closure closure, CodeVisitorSupport visitor) {
if (closure != null) {
ClassNode classNode = closure.getMetaClass().getClassNode();
if (classNode == null) {
throw new GroovyRuntimeException(
"Could not find the ClassNode for MetaClass: " + closure.getMetaClass());
}
List methods = classNode.getDeclaredMethods("doCall");
if (!methods.isEmpty()) {
MethodNode method = (MethodNode) methods.get(0);
if (method != null) {
Statement statement = method.getCode();
if (statement != null) {
statement.visit(visitor);
}
}
}
}
}
代码示例来源:origin: org.codehaus.groovy/groovy-jdk14
private void visit(Closure closure, CodeVisitorSupport visitor) {
if (closure != null) {
ClassNode classNode = closure.getMetaClass().getClassNode();
if (classNode == null) {
throw new GroovyRuntimeException(
"Could not find the ClassNode for MetaClass: " + closure.getMetaClass());
}
List methods = classNode.getDeclaredMethods("doCall");
if (!methods.isEmpty()) {
MethodNode method = (MethodNode) methods.get(0);
if (method != null) {
Statement statement = method.getCode();
if (statement != null) {
statement.visit(visitor);
}
}
}
}
}
内容来源于网络,如有侵权,请联系作者删除!