|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface provides additional methods for manipulating a class' source. For more information about classes see chapter 8 of the Java Language Specification.
Method Summary | |
JotConstructorSource |
addConstructor(JotMarker marker,
boolean before)
Adds a constructor to the class and returns an instance of JotConstructorSource that represents the constructor. |
JotFieldDeclaration |
addField(JotMarker marker,
boolean before,
java.lang.String variableType,
java.lang.String name)
Adds a field declaration to the class and returns an instance of JotFieldDeclaration that represents the field. |
JotInitBlock |
addInitBlock(JotMarker marker,
boolean before,
int mods)
Adds an initialization block to the class and returns an instance of JotInitBlock that represents the block. |
JotInnerClass |
addInnerClass(JotMarker marker,
boolean before,
java.lang.String name,
boolean isInterface)
Adds an inner class to the class and returns an instance of JotInnerClass that represents the class. |
JotType |
addInterface(JotMarker marker,
boolean before,
java.lang.String interfaceName)
Adds an interface to the implements clause for the class. |
JotMethodSource |
addMethod(JotMarker marker,
boolean before,
java.lang.String returnType,
java.lang.String name)
Adds a method implementation to the class and returns an instance of JotMethodSource that represents the method. |
JotMethodSource |
addMethodDeclaration(JotMarker marker,
boolean before,
java.lang.String returnType,
java.lang.String name)
Adds a method declaration (i.e. |
int |
getComparableLocation(JotMarker m)
Given a marker in the JotClass, returns a value that can be compared against another marker so as to determine which comes before the other in the source |
int |
getDeclaredModifiers()
Returns only the modifiers actually declared in the file. |
JotSourceFile |
getDeclaringFile()
Returns the JotSourceFile containing the class represented by this JotClassSource instance. |
void |
removeConstructor(JotConstructor method)
Removes the specified constructor from the class. |
void |
removeField(JotField field)
Removes the specified field's declaration from the class. |
void |
removeInitBlock(JotInitBlock block)
Removes the specified initialization block from the class. |
void |
removeInnerClass(JotInnerClass inner)
Removes the specified inner class from the class. |
void |
removeInterface(JotType iface)
Removes the specified interface from the implements clause. |
void |
removeMethod(JotMethod method)
Removes the specified method from the class. |
void |
setModifiers(int modifiers)
Specify the modifiers for the class. |
void |
setName(java.lang.String name)
Specifies the unqualified name of the class. |
void |
setSuperclass(java.lang.String Superclass)
Specifies the superclass of the class. |
Methods inherited from interface com.borland.jbuilder.jot.JotClass |
addUserData, getComponentType, getConstructor, getConstructors, getDeclaredConstructor, getDeclaredConstructors, getDeclaredField, getDeclaredFields, getDeclaredInnerClasses, getDeclaredMethod, getDeclaredMethods, getDeclaredMethods, getField, getFields, getFile, getInnerClasses, getInterfaces, getMethod, getMethods, getMethods, getModifiers, getName, getSuperclass, getType, getUserData, isArray, isAssignableFrom, isInstance, isInterface, isPrimitive, newInstance |
Methods inherited from interface com.borland.jbuilder.jot.JotCommentable |
addBlankLine, addComment, getComment, removeComment |
Methods inherited from interface com.borland.jbuilder.jot.JotMarker |
addUserData, getEndPosition, getStartPosition, getUserData |
Method Detail |
public void setName(java.lang.String name)
public JotSourceFile getDeclaringFile()
public int getDeclaredModifiers()
public void setModifiers(int modifiers)
Modifier
public void setSuperclass(java.lang.String Superclass)
public JotType addInterface(JotMarker marker, boolean before, java.lang.String interfaceName)
marker
- the Jot object relative to which the code is being addedbefore
- controls where, relative to the marker, code will be added.
true
places the statement before the marker false
places the statement after the marker.interfaceName
- is the name of the interface being implemented.public void removeInterface(JotType iface)
public JotInnerClass addInnerClass(JotMarker marker, boolean before, java.lang.String name, boolean isInterface)
isInterface
is true
,
then the class will be declared as an interface. If 'marker' is not null,
then the field will be inserted in the class either before or after the
marker depending on the value of 'before'.
marker
- the Jot object relative to which the code is being addedbefore
- controls where, relative to the marker, code will be added.
true
places the statement before the marker false
places the statement after the marker.name
- The name of inner class.isInterface
- Determins if the inner class is an interface.public void removeInnerClass(JotInnerClass inner)
public JotFieldDeclaration addField(JotMarker marker, boolean before, java.lang.String variableType, java.lang.String name)
marker
- the Jot object relative to which the code is being addedbefore
- controls where, relative to the marker, code will be added.
true
places the statement before the marker false
places the statement after the marker.variableType
- The datatype for the variable declaration.name
- The name of the variable.public void removeField(JotField field)
public JotMethodSource addMethod(JotMarker marker, boolean before, java.lang.String returnType, java.lang.String name)
This method is used to create method implementations. See addMethodDeclaration() for creating abstract methods.
marker
- the Jot object relative to which the code is being addedbefore
- controls where, relative to the marker, code will be added.
true
places the statement before the marker false
places the statement after the marker.returnType
- The return type for the method.public JotMethodSource addMethodDeclaration(JotMarker marker, boolean before, java.lang.String returnType, java.lang.String name)
This method is used to create method prototypes in an interface or to create abstract methods. See addMethod() for creating method implementations.
marker
- the Jot object relative to which the code is being addedbefore
- controls where, relative to the marker, code will be added.
true
places the statement before the marker false
places the statement after the marker.returnType
- The return type for the method.public void removeMethod(JotMethod method)
public JotConstructorSource addConstructor(JotMarker marker, boolean before)
marker
- the Jot object relative to which the code is being addedbefore
- controls where, relative to the marker, code will be added.
true
places the statement before the marker false
places the statement after the marker.public void removeConstructor(JotConstructor method)
public JotInitBlock addInitBlock(JotMarker marker, boolean before, int mods)
marker
- the Jot object relative to which the code is being addedbefore
- controls where, relative to the marker, code will be added.
true
places the statement before the marker false
places the statement after the marker.mods
- What modifier to use as defined by the constants in java.lang.reflect.Modifier.
java.lang.reflect.Modifier.
public void removeInitBlock(JotInitBlock block)
public int getComparableLocation(JotMarker m)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |