| java.lang.Object spoon.reflect.factory.SubFactory spoon.reflect.factory.ExecutableFactory spoon.reflect.factory.MethodFactory
Method Summary | |
public CtMethod<R> | create(CtClass> target, Set<ModifierKind> modifiers, CtTypeReference<R> returnType, String name, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock<B> body) Creates a method. | public CtMethod<T> | create(CtType> target, CtMethod<T> source, boolean redirectReferences) Creates a method by copying an existing method. | public CtMethod<T> | create(CtType> target, Set<ModifierKind> modifiers, CtTypeReference<T> returnType, String name, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes) Creates an empty method. | public CtExecutableReference<T> | createReference(CtMethod<T> m) Creates a method reference. | public CtExecutableReference<T> | createReference(Method method) Creates a method reference from an actual method. | public Collection<CtMethod<Void>> | getMainMethods() Gets all the main methods stored in this factory. |
MethodFactory | public MethodFactory(Factory factory)(Code) | | Creates a new method sub-factory.
Parameters: factory - the parent factory |
create | public CtMethod<R> create(CtClass> target, Set<ModifierKind> modifiers, CtTypeReference<R> returnType, String name, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock<B> body)(Code) | | Creates a method.
Parameters: target - the class where the method is inserted Parameters: modifiers - the modifiers Parameters: returnType - the method's return type Parameters: name - the method's name Parameters: parameters - the parameters Parameters: thrownTypes - the thrown types Parameters: body - the method's body |
create | public CtMethod<T> create(CtType> target, CtMethod<T> source, boolean redirectReferences)(Code) | | Creates a method by copying an existing method.
< Parameters: T - >the type of the method Parameters: target - the target type where the new method has to be inserted to Parameters: source - the source method to be copied Parameters: redirectReferences - tells if all the references to the owning type of the sourcemethod should be redirected to the target type (true isrecommended for most uses) the newly created method |
create | public CtMethod<T> create(CtType> target, Set<ModifierKind> modifiers, CtTypeReference<T> returnType, String name, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes)(Code) | | Creates an empty method.
Parameters: target - the class where the method is inserted Parameters: modifiers - the modifiers Parameters: returnType - the method's return type Parameters: name - the method's name Parameters: parameters - the parameters Parameters: thrownTypes - the thrown types |
Methods inherited from spoon.reflect.factory.ExecutableFactory | public CtAnonymousExecutable createAnonymous(CtClass> target, CtBlock> body)(Code)(Java Doc) public CtParameter<T> createParameter(CtExecutable> parent, CtTypeReference<T> type, String name)(Code)(Java Doc) public CtParameterReference<T> createParameterReference(CtParameter<T> parameter)(Code)(Java Doc) public CtExecutableReference<T> createReference(CtExecutable<T> e)(Code)(Java Doc) public CtExecutableReference<T> createReference(CtTypeReference> declaringType, CtTypeReference<T> type, String methodName, CtTypeReference>... parameterTypes)(Code)(Java Doc) public CtExecutableReference<T> createReference(CtTypeReference> declaringType, boolean isStatic, CtTypeReference<T> type, String methodName, CtTypeReference>... parameterTypes)(Code)(Java Doc) public CtExecutableReference<T> createReference(CtTypeReference> declaringType, boolean isStatic, CtTypeReference<T> type, String methodName, List<CtTypeReference<?>> parameterTypes)(Code)(Java Doc) public CtExecutableReference<T> createReference(CtTypeReference> declaringType, CtTypeReference<T> type, String methodName, List<CtTypeReference<?>> parameterTypes)(Code)(Java Doc) public CtExecutableReference<T> createReference(String signature)(Code)(Java Doc)
|
|
|