File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
msi.gama.core/src/msi/gaml/types Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 9
9
********************************************************************************************************/
10
10
package msi .gaml .types ;
11
11
12
+ import java .lang .reflect .Constructor ;
12
13
import java .lang .reflect .Executable ;
13
14
import java .lang .reflect .Modifier ;
14
15
import java .util .ArrayList ;
@@ -60,7 +61,9 @@ public Signature(final Executable method) {
60
61
} else {
61
62
List <IType <?>> types = new ArrayList ();
62
63
Class [] classes = method .getParameterTypes ();
63
- if (!Modifier .isStatic (method .getModifiers ())) { types .add (Types .get (method .getDeclaringClass ())); }
64
+ boolean isStatic = Modifier .isStatic (method .getModifiers ());
65
+ boolean isConstructor = method instanceof Constructor ;
66
+ if (!isStatic && !isConstructor ) { types .add (Types .get (method .getDeclaringClass ())); }
64
67
for (Class c : classes ) { if (c != IScope .class ) { types .add (Types .get (c )); } }
65
68
list = types .toArray (new IType [types .size ()]);
66
69
}
You can’t perform that action at this time.
0 commit comments