KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jac > core > rtti > LoadtimeRTTI


1 /*
2   Copyright (C) 2001-2003 Laurent Martelli <laurent@aopsys.com>
3   
4   This program is free software; you can redistribute it and/or modify
5   it under the terms of the GNU Lesser General Public License as
6   published by the Free Software Foundation; either version 2 of the
7   License, or (at your option) any later version.
8
9   This program is distributed in the hope that it will be useful,
10   but WITHOUT ANY WARRANTY; without even the implied warranty of
11   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12   GNU Lesser General Public License for more details.
13
14   You should have received a copy of the GNU Lesser General Public License
15   along with this program; if not, write to the Free Software
16   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */

17
18 package org.objectweb.jac.core.rtti;
19
20
21 /**
22  * This class defines the super class for all the meta items whithin
23  * the rtti aspect.<p>
24  *
25  * A meta item encapsulates a <code>java.lang.reflect</code> item so
26  * that the user of this item can add extra informations
27  * (attributes). Typically this feature can be used by an aspect to
28  * tag an element of the model to react to this tag later on.<p>
29  *
30  * Examples:<p> <ul>
31  *
32  * <li>A persistence aspect can tag some field persistent, add methods
33  * that change the object states even if they do not fit naming
34  * conventions...<p>
35  *
36  * <li>A GUI can tag a given field to be invisible or a class to be
37  * displayed by a special view (eg a given Swing component)...
38  *
39  * </ul>
40  *
41  * @author Renaud Pawlak
42  * @author Laurent Martelli
43  */

44
45 public interface LoadtimeRTTI {
46     /**
47      * Tells that a method modifies a field
48      */

49     void addltModifiedField(String JavaDoc className, String JavaDoc methodSign, String JavaDoc fieldName);
50
51     /**
52      * Tells that a method reads a field
53      */

54     void addltAccessedField(String JavaDoc className, String JavaDoc methodSign, String JavaDoc fieldName);
55
56     /**
57      * Tells that a method calls add on a collection field
58      */

59     void addltAddedCollection(String JavaDoc className, String JavaDoc methodSign, String JavaDoc fieldName);
60
61     /**
62      * Tells that a method calls remove on a collection field
63      */

64     void addltRemovedCollection(String JavaDoc className, String JavaDoc methodSign, String JavaDoc fieldName);
65
66     /**
67      * Tells that a method calls modifies the content of a collection field
68      */

69     void addltModifiedCollection(String JavaDoc className, String JavaDoc methodSign, String JavaDoc fieldName);
70
71     /**
72      * Tells that a method is the setter of a field (sets the field
73      * with the value of a parameter)
74      */

75     void addltSetField(String JavaDoc className, String JavaDoc methodSign, String JavaDoc fieldName);
76
77     /**
78      * Tells that a method returns the value of field
79      */

80     void addltReturnedField(String JavaDoc className, String JavaDoc methodSign, String JavaDoc fieldName);
81
82     /**
83      * Tells wether a method is a getter of a field or not
84      */

85     void setltIsGetter(String JavaDoc className, String JavaDoc methodSign, boolean isGetter);
86
87     /**
88      * Returns the class info of a class
89      */

90     ClassInfo getClassInfo(String JavaDoc className);
91
92     /**
93      *
94      */

95     void setClassInfo(String JavaDoc className, ClassInfo classInfo);
96
97     /**
98      * Tells that a method's parameter is used as an index of a
99      * collection field
100      */

101     void setCollectionIndexArgument(String JavaDoc className, String JavaDoc method, int argument);
102
103     /**
104      * Tells that a method's parameter is used as an item to be added
105      * to a collection field
106      */

107     void setCollectionItemArgument(String JavaDoc className, String JavaDoc method, int argument);
108
109     /**
110      * Tells that a method calls the super method
111      */

112     void setCallSuper(String JavaDoc className, String JavaDoc method);
113
114     /**
115      * Tells that a method invokes another method
116      */

117     void addInvokedMethod(String JavaDoc className, String JavaDoc methodSign,
118                           InvokeInfo invokeInfo);
119 }
120
Popular Tags