1 | // |
2 | // (c) Copyright, Moebius Solutions, 2002, 2003 |
3 | // |
4 | // All Rights Reserved |
5 | // |
6 | // This material may be reproduced by or for the U. S. Government |
7 | // pursuant to the copyright license under the clause at |
8 | // DFARS 252.227-7013 (OCT 1988). |
9 | // |
10 | package com.moesol.generator; |
11 | |
12 | import java.lang.reflect.*; |
13 | |
14 | public class ConstructorCallable extends Callable { |
15 | public ConstructorCallable(Constructor constructor) { |
16 | this.constructor = constructor; |
17 | } |
18 | public Class getDeclaringClass() { |
19 | return constructor.getDeclaringClass(); |
20 | } |
21 | public Class getReturnType() { |
22 | return null; |
23 | } |
24 | public Class[] getParameterTypes() { |
25 | return constructor.getParameterTypes(); |
26 | } |
27 | public Class[] getExceptionTypes() { |
28 | return constructor.getExceptionTypes(); |
29 | } |
30 | public String getName() { |
31 | return ClassGenerator.stripPackageName(constructor.getName()); |
32 | } |
33 | public int getModifiers() { |
34 | return constructor.getModifiers(); |
35 | } |
36 | public boolean isOverloaded() { |
37 | return constructor.getDeclaringClass().getDeclaredConstructors().length > 1; |
38 | } |
39 | public boolean isImpl() { |
40 | // TODO Auto-generated method stub |
41 | return false; |
42 | } |
43 | |
44 | Constructor constructor; |
45 | } |