KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > kilim > description > TpConstructor


1 package org.objectweb.kilim.description;
2
3 import org.objectweb.kilim.KilimException;
4
5 /**
6  * @author horn
7  */

8
9 public class TpConstructor extends TpMethod {
10
11     /**
12      * A public constructor for "constructor" descriptions.
13      * @param aSupport : the support of the constructor. It is a ClassSource
14      * @param isP : is true if the constructor can be used as a provider (is generally true).
15      * @param isT : is true if the constructor can be used as a transformer (through its side effects).
16      * @param aTemplate : the template in which the constructor is declared.
17      * @throws KilimException : generated if aSupport or aTemplate is null.
18      */

19     public TpConstructor(BasicElement aSupport, boolean isP, boolean isT, TemplateDescription aTemplate) throws KilimException {
20         super(aSupport, "<init>", true, isP, isT, aTemplate);
21     }
22     
23     /**
24      *A public constructor for "constructor" descriptions. It is strictly equivalent to TpConstructor(aSupport, true, false, aTemplate);
25      * @param aSupport : the support of the constructor. It is a ClassSource
26      * @param aTemplate : the template in which the constructor is declared.
27      * @throws KilimException : generated if aSupport or aTemplate is null.
28      */

29     public TpConstructor(BasicElement aSupport, TemplateDescription aTemplate) throws KilimException {
30         this(aSupport, true, false, aTemplate);
31     }
32         
33     /**
34      * @see org.objectweb.kilim.description.MethodSourceImpl#isStatic(boolean)
35      */

36     public void isStatic(boolean jStatic) throws KilimException {
37         throw new KilimException("attempt to set a static qualifier on a ctor in template " + getContainingTemplate().getName());
38     }
39     
40     /**
41      * @see org.objectweb.kilim.description.BasicElement#getKind()
42      */

43     public int getKind() {
44         return KILIM.CONSTRUCTOR;
45     }
46 }
47
Popular Tags