public interface Constructor extends Access, InitializationDeclaration
Declaration
subinterface for a class constructor.Modifier and Type | Interface and Description |
---|---|
static class |
Constructor.ForwardingTarget
The target of a constructor forwarding.
|
Access.AccessType
Modifier and Type | Method and Description |
---|---|
FormalParameter |
addParameter(Class type,
String name)
Adds a new formal parameter to the list of parameters with the given
Type and name, and returns the FormalParameter object. |
FormalParameter |
addParameter(Type type,
String name)
Adds a new formal parameter to the list of parameters with the given
Type and name, and returns the FormalParameter object. |
Constructor |
addThrows(String type)
Adds this String to the list of throws.
|
ConstructorForwarding |
forwardCall(Constructor.ForwardingTarget target)
A Constructor forwarding call.
|
List<FormalParameter> |
getParameters()
Gets the list of formal parameters as a list of
FormalParameter . |
List<String> |
getThrows()
Gets the list of throws clauses as a list of
String . |
javadoc
getStatements, insertStatement, insertStatement, newBreak, newContinue, newDeclarationLet, newDoWhile, newEmpty, newFor, newIf, newLet, newLocalBlock, newLocalClass, newLocalClass, newReturn, newStmt, newSwitch, newSynchronized, newThrow, newTry, newWhile, removeStmt
applyStyle, cast, getComment, isActive, isBlockWithAbruptCompletion, setComment, toCode, visit, vm
ConstructorForwarding forwardCall(Constructor.ForwardingTarget target)
The call can be forwarded either to this(..)
or super(..)
.
By default, no forwarding is created.
target
- The target of the forwarding. If this value is null
,
no forwarding statement is created.ConstructorForwarding
, or
null
, if no forwarding is active.FormalParameter addParameter(Class type, String name)
Type
and name, and returns the FormalParameter
object.FormalParameter addParameter(Type type, String name)
Type
and name, and returns the FormalParameter
object.Constructor addThrows(String type)
List<FormalParameter> getParameters()
FormalParameter
.Copyright © 2000–2018 jenesis4java. All rights reserved.