|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--kawigi.template.MethodInfo
Represents a tag in a tag library. The typical format of this object is that it is composed of a name (which should be absolutely unique), calling code which gets inserted where the tag is placed, and method code that gets inserted later, outside of the primary method. In some cases the method code is inherited, or a MethodInfo object may not even literally represent a method call. In these cases, the method code should be an empty array. This class is bean compliant :-)
| Field Summary | |
protected java.lang.String[] |
callingCode
A template for the code inserted where this tag is invoked. |
protected java.lang.String[] |
methodCode
The code of the method being called. |
protected java.lang.String |
methodName
The unique name of the tag associated with this object. |
| Constructor Summary | |
MethodInfo()
Creates a new instance of MethodInfo with null fields. |
|
MethodInfo(java.lang.String methodName,
java.lang.String[] methodCode,
java.lang.String[] callingCode)
Constructs a new MethodInfo with the given name, method code, and calling code. |
|
| Method Summary | |
int |
compareTo(java.lang.Object o)
Returns whether this MethodInfo is greater than, equal to, or less than another object, by comparing method names lexically. |
boolean |
equals(java.lang.Object o)
Returns true if o is a MethodInfo with the same name as this object. |
java.lang.String[] |
getCallingCode(java.lang.String[] params)
Translates the callingCode template to use the parameter list given. |
java.lang.String[] |
getCallingCodeTemplate()
Accessor for callingCode. |
java.lang.String[] |
getMethodCode()
Accessor for methodCode. |
java.lang.String |
getMethodName()
Accessor for methodName. |
int |
hashCode()
Returns a hash code appropriate for hashing this object, so that it can be stored dependably in a HashSet or used as a key in a HashMap. |
static kawigi.template.MethodInfo |
read(java.io.BufferedReader in)
Reads this MethodInfo from a stream. |
void |
setCallingCodeTemplate(java.lang.String[] code)
Mutator for callingCode. |
void |
setMethodCode(java.lang.String[] code)
Mutator for methodCode. |
void |
setMethodName(java.lang.String name)
Mutator for methodName. |
java.lang.String |
toString()
Returns a string representation of this object. |
void |
write(java.io.PrintWriter out)
Writes this MethodInfo to a stream. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.String methodName
protected java.lang.String[] methodCode
protected java.lang.String[] callingCode
methodName($1,$2,$3);There should be one element in the array for each "line" of code that should be inserted (in the above example, there is only one line).
| Constructor Detail |
public MethodInfo(java.lang.String methodName,
java.lang.String[] methodCode,
java.lang.String[] callingCode)
public MethodInfo()
| Method Detail |
public java.lang.String[] getCallingCode(java.lang.String[] params)
public java.lang.String[] getCallingCodeTemplate()
public void setCallingCodeTemplate(java.lang.String[] code)
public java.lang.String[] getMethodCode()
public void setMethodCode(java.lang.String[] code)
public java.lang.String getMethodName()
public void setMethodName(java.lang.String name)
public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int compareTo(java.lang.Object o)
compareTo in interface java.lang.Comparablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void write(java.io.PrintWriter out)
public static kawigi.template.MethodInfo read(java.io.BufferedReader in)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||