Search in sources :

Example 91 with MetaClass

use of groovy.lang.MetaClass in project groovy by apache.

the class OwnedMetaClass method respondsTo.

@Override
public List<MetaMethod> respondsTo(Object obj, String name, Object[] argTypes) {
    final Object owner = getOwner();
    final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
    return ownerMetaClass.respondsTo(owner, name, argTypes);
}
Also used : MetaClass(groovy.lang.MetaClass) DelegatingMetaClass(groovy.lang.DelegatingMetaClass) GroovyObject(groovy.lang.GroovyObject)

Example 92 with MetaClass

use of groovy.lang.MetaClass in project groovy by apache.

the class OwnedMetaClass method respondsTo.

@Override
public List<MetaMethod> respondsTo(Object obj, String name) {
    final Object owner = getOwner();
    final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
    return ownerMetaClass.respondsTo(owner, name);
}
Also used : MetaClass(groovy.lang.MetaClass) DelegatingMetaClass(groovy.lang.DelegatingMetaClass) GroovyObject(groovy.lang.GroovyObject)

Example 93 with MetaClass

use of groovy.lang.MetaClass in project groovy by apache.

the class OwnedMetaClass method invokeMethod.

@Override
public Object invokeMethod(Object object, String methodName, Object[] arguments) {
    final Object owner = getOwner();
    final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
    return ownerMetaClass.invokeMethod(owner, methodName, arguments);
}
Also used : MetaClass(groovy.lang.MetaClass) DelegatingMetaClass(groovy.lang.DelegatingMetaClass) GroovyObject(groovy.lang.GroovyObject)

Example 94 with MetaClass

use of groovy.lang.MetaClass in project groovy by apache.

the class OwnedMetaClass method getClassNode.

@Override
public ClassNode getClassNode() {
    final Object owner = getOwner();
    final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
    return ownerMetaClass.getClassNode();
}
Also used : MetaClass(groovy.lang.MetaClass) DelegatingMetaClass(groovy.lang.DelegatingMetaClass) GroovyObject(groovy.lang.GroovyObject)

Example 95 with MetaClass

use of groovy.lang.MetaClass in project groovy by apache.

the class OwnedMetaClass method getMetaMethods.

@Override
public List<MetaMethod> getMetaMethods() {
    final Object owner = getOwner();
    final MetaClass ownerMetaClass = getOwnerMetaClass(owner);
    return ownerMetaClass.getMetaMethods();
}
Also used : MetaClass(groovy.lang.MetaClass) DelegatingMetaClass(groovy.lang.DelegatingMetaClass) GroovyObject(groovy.lang.GroovyObject)

Aggregations

MetaClass (groovy.lang.MetaClass)141 DelegatingMetaClass (groovy.lang.DelegatingMetaClass)62 GroovyObject (groovy.lang.GroovyObject)62 ExpandoMetaClass (groovy.lang.ExpandoMetaClass)40 MetaClassImpl (groovy.lang.MetaClassImpl)18 MetaProperty (groovy.lang.MetaProperty)12 GroovyRuntimeException (groovy.lang.GroovyRuntimeException)11 MetaMethod (groovy.lang.MetaMethod)11 ArrayList (java.util.ArrayList)11 MixinInMetaClass (org.codehaus.groovy.reflection.MixinInMetaClass)11 AdaptingMetaClass (groovy.lang.AdaptingMetaClass)9 MetaClassRegistry (groovy.lang.MetaClassRegistry)9 Map (java.util.Map)9 GString (groovy.lang.GString)7 CachedClass (org.codehaus.groovy.reflection.CachedClass)7 ClassInfo (org.codehaus.groovy.reflection.ClassInfo)7 MissingMethodException (groovy.lang.MissingMethodException)6 MissingPropertyException (groovy.lang.MissingPropertyException)6 IOException (java.io.IOException)6 Method (java.lang.reflect.Method)6