Java Code Examples for org.codehaus.groovy.runtime.MetaClassHelper#castArgumentsToClassArray()

The following examples show how to use org.codehaus.groovy.runtime.MetaClassHelper#castArgumentsToClassArray() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MetaClassImpl.java    From groovy with Apache License 2.0 5 votes vote down vote up
/**
 * @see MetaObjectProtocol#respondsTo(Object, String, Object[])
 */
public List respondsTo(Object obj, String name, Object[] argTypes) {
    Class[] classes = MetaClassHelper.castArgumentsToClassArray(argTypes);
    MetaMethod m = getMetaMethod(name, classes);
    if (m != null) {
        return Collections.singletonList(m);
    }
    return Collections.emptyList();
}
 
Example 2
Source File: MetaClassImpl.java    From groovy with Apache License 2.0 4 votes vote down vote up
/**
 * @see MetaObjectProtocol#getStaticMetaMethod(String, Object[])
 */
public MetaMethod getStaticMetaMethod(String name, Object[] argTypes) {
    Class[] classes = MetaClassHelper.castArgumentsToClassArray(argTypes);
    return pickStaticMethod(name, classes);
}
 
Example 3
Source File: MetaClassImpl.java    From groovy with Apache License 2.0 4 votes vote down vote up
/**
 * @see MetaObjectProtocol#getMetaMethod(String, Object[])
 */
public MetaMethod getMetaMethod(String name, Object[] argTypes) {
    Class[] classes = MetaClassHelper.castArgumentsToClassArray(argTypes);
    return pickMethod(name, classes);
}