The main reason for this interface is to permit users to manipulate homogeneously all nodes with a getMembers method.
| Modifier and Type | Method and Description |
|---|---|
| public default ConstructorDeclaration | Returns: the created constructorthe modifiers like modifiersModifier.Adds a constructor to this node with members. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field typeClass, String the name of the field name, Modifier.the modifiers like modifiersModifier.Add a field to this and automatically add the import of the type if needed |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name, Modifier.the modifiers like modifiersModifier.Add a field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name, Modifier.the modifiers like modifiersModifier.Add a field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field typeClass, String the name of the field name, Expression the initializer of the field initializer, Modifier.the modifiers like modifiersModifier.Add a field to this and automatically add the import of the type if needed |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name, Expression the initializer of the field initializer, Modifier.the modifiers like modifiersModifier.Add a field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name, Expression the initializer of the field initializer, Modifier.the modifiers like modifiersModifier.Add a field to this. |
| public default BlockStmt | |
| public default N | |
| public default MethodDeclaration | Returns: theMethodDeclaration createdthe method name methodName, Modifier.the modifiers like modifiersModifier.Adds a methods with void return by default to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field typeClass, String the name of the field name)Add a private field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name)Add a private field to this and automatically add the import of the type if needed. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name)Add a private field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field typeClass, String the name of the field name)Add a protected field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name)Add a protected field to this and automatically add the import of the type if needed. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name)Add a protected field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field typeClass, String the name of the field name)Add a public field to this. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name)Add a public field to this and automatically add the import of the type if needed. |
| public default FieldDeclaration | Returns: theFieldDeclaration createdthe type of the field type, String the name of the field name)Add a public field to this. |
| public default BlockStmt | |
| public default Optional | Returns: the constructor found, if any.the types of parameters like paramTypes)"Map<Integer, String>", "int" to match
Foo(Map<Integer,String> myMap, int number)Try to find a |
| public default Optional | Returns: the constructor found, if any.the types of parameters like paramTypes)Map.class, int.class to match
Foo(Map<Integer,String> myMap, int number)Try to find a |
| public default List | Returns: the constructors found. This list is immutable.Find all constructors in the members of this node. |
| public default Optional | Returns: the constructor found, if any.Try to find a |
| public default Optional | Returns: null if not found, the FieldDeclaration otherwisethe name of the field name)Try to find a |
| public default List | Returns: the fields found. This list is immutable.Find all fields in the members of this node. |
| public default BodyDeclaration | |
| public NodeList | Returns: all members inside the braces of this node, like fields, methods, nested types, etc.
|
| public default List | Returns: the methods found. This list is immutable.Find all methods in the members of this node. |
| public default List | Returns: the methods found (multiple in case of overloading)the name of the method name)Try to find a |
| public default List | Returns: the methods foundthe types of parameters like paramTypes)"Map<Integer, String>", "int" to match
void foo(Map<Integer,String> myMap, int number)Try to find a |
| public default List | Returns: the methods foundthe types of parameters like paramTypes)Map.class, int.class to match
void foo(Map<Integer,String> myMap, int number)Try to find a |
| public default List | Returns: the methods foundthe types of parameters like paramTypes)"Map<Integer, String>", "int" to match
void foo(Map<Integer,String> myMap, int number)Try to find |
| public default boolean | |
| public default N | |
| public N | |
| public void |
| addConstructor | back to summary |
|---|---|
| public default ConstructorDeclaration addConstructor(Modifier. Adds a constructor to this node with members.
| |
| addField | back to summary |
|---|---|
| public default FieldDeclaration addField(Class<?> typeClass, String name, Modifier. Add a field to this and automatically add the import of the type if needed
| |
| addField | back to summary |
|---|---|
| public default FieldDeclaration addField(String type, String name, Modifier. Add a field to this.
| |
| addField | back to summary |
|---|---|
| public default FieldDeclaration addField(Type type, String name, Modifier. Add a field to this.
| |
| addFieldWithInitializer | back to summary |
|---|---|
| public default FieldDeclaration addFieldWithInitializer(Class<?> typeClass, String name, Expression initializer, Modifier. Add a field to this and automatically add the import of the type if needed
| |
| addFieldWithInitializer | back to summary |
|---|---|
| public default FieldDeclaration addFieldWithInitializer(String type, String name, Expression initializer, Modifier. Add a field to this.
| |
| addFieldWithInitializer | back to summary |
|---|---|
| public default FieldDeclaration addFieldWithInitializer(Type type, String name, Expression initializer, Modifier. Add a field to this.
| |
| addInitializer | back to summary |
|---|---|
| public default BlockStmt addInitializer() Add an initializer block ( | |
| addMember | back to summary |
|---|---|
public default N addMember(BodyDeclaration<?> member)
| |
| addMethod | back to summary |
|---|---|
| public default MethodDeclaration addMethod(String methodName, Modifier. Adds a methods with void return by default to this.
| |
| addPrivateField | back to summary |
|---|---|
| public default FieldDeclaration addPrivateField(Class<?> typeClass, String name) Add a private field to this.
| |
| addPrivateField | back to summary |
|---|---|
| public default FieldDeclaration addPrivateField(String type, String name) Add a private field to this and automatically add the import of the type if needed.
| |
| addPrivateField | back to summary |
|---|---|
| public default FieldDeclaration addPrivateField(Type type, String name) Add a private field to this.
| |
| addProtectedField | back to summary |
|---|---|
| public default FieldDeclaration addProtectedField(Class<?> typeClass, String name) Add a protected field to this.
| |
| addProtectedField | back to summary |
|---|---|
| public default FieldDeclaration addProtectedField(String type, String name) Add a protected field to this and automatically add the import of the type if needed.
| |
| addProtectedField | back to summary |
|---|---|
| public default FieldDeclaration addProtectedField(Type type, String name) Add a protected field to this.
| |
| addPublicField | back to summary |
|---|---|
| public default FieldDeclaration addPublicField(Class<?> typeClass, String name) Add a public field to this.
| |
| addPublicField | back to summary |
|---|---|
| public default FieldDeclaration addPublicField(String type, String name) Add a public field to this and automatically add the import of the type if needed.
| |
| addPublicField | back to summary |
|---|---|
| public default FieldDeclaration addPublicField(Type type, String name) Add a public field to this.
| |
| addStaticInitializer | back to summary |
|---|---|
| public default BlockStmt addStaticInitializer() Add a static initializer block ( | |
| getConstructorByParameterTypes | back to summary |
|---|---|
| public default Optional Try to find a
| |
| getConstructorByParameterTypes | back to summary |
|---|---|
| public default Optional Try to find a
| |
| getConstructors | back to summary |
|---|---|
| public default List Find all constructors in the members of this node.
| |
| getDefaultConstructor | back to summary |
|---|---|
| public default Optional Try to find a
| |
| getFieldByName | back to summary |
|---|---|
| public default Optional Try to find a
| |
| getFields | back to summary |
|---|---|
| public default List Find all fields in the members of this node.
| |
| getMember | back to summary |
|---|---|
| public default BodyDeclaration | |
| getMembers | back to summary |
|---|---|
public NodeList
| |
| getMethods | back to summary |
|---|---|
| public default List Find all methods in the members of this node.
| |
| getMethodsByName | back to summary |
|---|---|
| public default List Try to find a
| |
| getMethodsByParameterTypes | back to summary |
|---|---|
| public default List Try to find a
| |
| getMethodsByParameterTypes | back to summary |
|---|---|
| public default List Try to find a
| |
| getMethodsBySignature | back to summary |
|---|---|
| public default List Try to find
| |
| isEmpty | back to summary |
|---|---|
public default boolean isEmpty()
| |
| setMember | back to summary |
|---|---|
public default N setMember(int i, BodyDeclaration<?> member)
| |
| setMembers | back to summary |
|---|---|
| public N setMembers(NodeList<BodyDeclaration<?>> members) | |
| tryAddImportToParentCompilationUnit | back to summary |
|---|---|
| public void tryAddImportToParentCompilationUnit(Class<?> clazz) | |