Groovy Documentation

org.codehaus.groovy.grails.commons.metaclass
[Java] Interface DynamicConstructor


public interface DynamicConstructor

Defines a dynamic constructor.

Authors:
Graeme Rocher
Since:
0.2


Method Summary
java.lang.Object invoke(java.lang.Class clazz, Object[] args)

Invokes the dynamic constructor.

boolean isArgumentsMatch(Object[] args)

Test whether the specified arguments match this constructor.

 

Method Detail

invoke

@SuppressWarnings("rawtypes")
public java.lang.Object invoke(java.lang.Class clazz, Object[] args)
Invokes the dynamic constructor.
Parameters:
clazz - The actual class
args - The arguments
Returns:
The returned instance


isArgumentsMatch

public boolean isArgumentsMatch(Object[] args)
Test whether the specified arguments match this constructor.
Parameters:
args - The arguments to check
Returns:
True if the arguments match


 

Groovy Documentation