com.borland.jbuilder.jot
Interface JotNew

All Superinterfaces:
JotExpression, JotMarker, JotSourceElement

public interface JotNew
extends JotExpression

This interface represents a Java new expression. See sections 15.8 & 15.9 of the Java Language Specification for more information. For array initializer expressions, see JotInitializer


Method Summary
 JotExpression addArgument(JotMarker marker, boolean before, java.lang.String arg)
          Adds a JotExpression object that represents an argument to the invoked constructor unless the instantiated object is of array type.
 JotClass getAnonymousClass()
          If the new object is an instance of an anonymous class, returns the anonymous class' definition.
 JotExpression[] getArguments()
          Returns an array of JotExpression objects which represents the arguments to the invoked constructor.
 JotType getType()
          Returns the type of the instantiated object.
 boolean isArray()
          Returns true if the instantiated object is of array type.
 void removeArgument(JotExpression arg)
          Removes the specified argument from the constructor.
 void setType(java.lang.String type)
          Specifies the type of the instantiated object.
 
Methods inherited from interface com.borland.jbuilder.jot.JotExpression
getAssignment, getCondition, getMethodCall, getNew, getOperation, getValue, getVariable, isConstant, isNull
 
Methods inherited from interface com.borland.jbuilder.jot.JotMarker
addUserData, getEndPosition, getStartPosition, getUserData
 
Methods inherited from interface com.borland.jbuilder.jot.JotSourceElement
getIndentLevel, getParent, getText, isModified, setModified, setText
 

Method Detail

getType

public JotType getType()
Returns the type of the instantiated object.

setType

public void setType(java.lang.String type)
Specifies the type of the instantiated object. The type need not be fully-qualified.

getAnonymousClass

public JotClass getAnonymousClass()
If the new object is an instance of an anonymous class, returns the anonymous class' definition.

isArray

public boolean isArray()
Returns true if the instantiated object is of array type.

getArguments

public JotExpression[] getArguments()
Returns an array of JotExpression objects which represents the arguments to the invoked constructor. If the instantiated object is of array type, then returns the dimensions of the array.

addArgument

public JotExpression addArgument(JotMarker marker,
                                 boolean before,
                                 java.lang.String arg)
Adds a JotExpression object that represents an argument to the invoked constructor unless the instantiated object is of array type. In this case, adds a dimension to the new array. The return value is the created JotExpression instance. If marker is non-null, then the new object is inserted before or after the marker depending on the value of before.

removeArgument

public void removeArgument(JotExpression arg)
Removes the specified argument from the constructor. If the instantiated object is of array type, then removes the specified dimension.