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, java.lang.Object[] args)

Invokes the dynamic constructor.

boolean isArgumentsMatch(java.lang.Object[] args)

Test whether the specified arguments match this constructor.

 

Method Detail

invoke

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


isArgumentsMatch

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


 

Groovy Documentation