| Package | Description |
|---|---|
| org.jboss.forge.roaster.model.source | |
| org.jboss.forge.roaster.model.util |
| Modifier and Type | Method and Description |
|---|---|
MethodSource<O> |
MethodHolderSource.addMethod()
Add an uninitialized
MethodSource declaration to this O instance. |
MethodSource<O> |
MethodHolderSource.addMethod(Method method)
Add a new
MethodSource declaration to this O instance, using the given
Method as the method declaration. |
MethodSource<O> |
MethodHolderSource.addMethod(Method<?,?> method)
Add a new
MethodSource declaration to this O instance, using the given Method as the
method declaration. |
MethodSource<O> |
MethodHolderSource.addMethod(String method)
Add a new
MethodSource declaration to this O instance, using the given String as the
method declaration. |
MethodSource<O> |
MethodSource.addThrows(Class<? extends Exception> type)
Add a thrown
Exception to this method's signature. |
MethodSource<O> |
MethodSource.addThrows(String type)
Add a thrown
Exception to this method's signature. |
MethodSource<O> |
PropertySource.createAccessor()
Create the accessor method.
|
MethodSource<O> |
PropertySource.createMutator()
Create the mutator method.
|
MethodSource<O> |
PropertySource.getAccessor()
Override.
|
MethodSource<O> |
MethodHolderSource.getMethod(String name)
Return the
MethodSource with the given name and zero parameters; otherwise return null. |
MethodSource<O> |
MethodHolderSource.getMethod(String name,
Class<?>... paramTypes)
Return the
MethodSource with the given name and signature types; otherwise return null. |
MethodSource<O> |
MethodHolderSource.getMethod(String name,
String... paramTypes)
Return the
MethodSource with the given name and signature types; otherwise return null. |
MethodSource<O> |
PropertySource.getMutator()
Override.
|
MethodSource<O> |
MethodSource.removeParameter(Class<?> type,
String name)
Remove a parameter with the specified
Class type and name from this method |
MethodSource<O> |
MethodSource.removeParameter(JavaType<?> type,
String name)
Remove a parameter with the specified
JavaType type and name to this method |
MethodSource<O> |
MethodSource.removeParameter(ParameterSource<O> parameter)
Remove a parameter from this method
|
MethodSource<O> |
MethodSource.removeParameter(String type,
String name)
Remove a parameter with the specified type and name from this method
|
MethodSource<O> |
MethodSource.removeThrows(Class<? extends Exception> type)
Remove a thrown
Exception to this method's signature. |
MethodSource<O> |
MethodSource.removeThrows(String type)
Remove a thrown
Exception to this method's signature. |
MethodSource<O> |
MethodSource.setBody(String body)
Set the inner body of this
Method |
MethodSource<O> |
MethodSource.setConstructor(boolean constructor)
Toggle this method as a constructor.
|
MethodSource<O> |
MethodSource.setDefault(boolean value)
Sets the default keyword in this method
|
MethodSource<O> |
MethodSource.setNative(boolean value)
Sets this method to be native
IMPORTANT: Setting it to
true will remove the method body. |
MethodSource<O> |
MethodSource.setParameters(String string)
Set this
Method's parameters. |
MethodSource<O> |
MethodSource.setReturnType(Class<?> type)
Set this
Method to return the given type. |
MethodSource<O> |
MethodSource.setReturnType(JavaType<?> type)
Set this
Method to return the given type. |
MethodSource<O> |
MethodSource.setReturnType(String type)
Set this
Method to return the given type. |
MethodSource<O> |
MethodSource.setReturnType(Type<?> type)
Set this
Method to return the given type. |
MethodSource<O> |
MethodSource.setReturnTypeVoid()
Set this
Method to return 'void' |
MethodSource<O> |
MethodSource.setSynchronized(boolean value)
Sets the synchronized keyword in this element.
|
| Modifier and Type | Method and Description |
|---|---|
List<MethodSource<O>> |
MethodHolderSource.getMethods()
Get a
List of all MethodSources declared by this O instance, if any; otherwise, return an
empty List |
| Modifier and Type | Method and Description |
|---|---|
static List<MethodSource<?>> |
Methods.implementAbstractMethods(Class<?> source,
MethodHolderSource<?> target)
Implement the abstract methods present in a
Class to the specified MethodHolderSource. |
static List<MethodSource<?>> |
Methods.implementAbstractMethods(MethodHolder<?> source,
MethodHolderSource<?> target)
Implement the abstract methods present in a
MethodHolder to the specified MethodHolderSource. |
| Modifier and Type | Method and Description |
|---|---|
static void |
Methods.implementMethod(MethodSource<?> source)
Adds a default method implementation to the given
MethodSource. |
static void |
Methods.removeAllAnnotations(MethodSource<?> source) |
Copyright © 2019 JBoss by Red Hat. All rights reserved.