|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSFE.GUI.Function
public class Function
Function A Function includes all function information. It contains the following data: name, description, return type, arguments, local variables and body. A Function renders itself using generateCode(). A function marked with 'must=true' cannot be deleted. Initialize with: Function(program, name) Function(program, name, return-type, must)
Field Summary | |
---|---|
javax.swing.DefaultListModel |
arguments
|
javax.swing.DefaultListModel |
body
|
java.util.Vector |
descDoc
|
ProgramDocument |
functionDoc
|
ProgramDocument |
nameDoc
|
Type |
returnType
|
javax.swing.DefaultListModel |
variables
|
Constructor Summary | |
---|---|
Function(Program program,
java.lang.String name)
|
|
Function(Program program,
java.lang.String name,
Type retType,
boolean must)
Build an undeletable function |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object other)
Compares function by name |
java.lang.String |
generateCode()
Generate and return the function code |
java.lang.String |
getDescription()
Get the function description |
boolean |
isMust()
Is function undeletable |
java.lang.String |
toString()
String representation of the function |
void |
updateDoc()
Update function body document |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public ProgramDocument nameDoc
public Type returnType
public java.util.Vector descDoc
public javax.swing.DefaultListModel arguments
public javax.swing.DefaultListModel variables
public javax.swing.DefaultListModel body
public ProgramDocument functionDoc
Constructor Detail |
---|
public Function(Program program, java.lang.String name)
public Function(Program program, java.lang.String name, Type retType, boolean must)
program
- The programname
- Function nameretType
- return typemust
- is function undeletableMethod Detail |
---|
public void updateDoc()
public boolean isMust()
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDescription()
public java.lang.String generateCode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |