Package org.jboss.forge.roaster.model
Interface Method<O extends JavaType<O>,T extends Method<O,T>>
-
- All Superinterfaces:
Abstractable,AnnotationTarget<O>,FinalCapable,Internal,Member<O>,Named,Origin<O>,StaticCapable,VisibilityScoped
- All Known Subinterfaces:
MethodSource<O>
public interface Method<O extends JavaType<O>,T extends Method<O,T>> extends Abstractable, Member<O>
Represents a Java Method.- Author:
- Lincoln Baxter, III
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringgetBody()Get the inner body of thisMethodList<? extends Parameter<O>>getParameters()Get a list of thisMethod's parameters.Type<O>getReturnType()List<String>getThrownExceptions()Get a list of qualified (if possible)Exceptionclass names thrown by this method.booleanisConstructor()Returntrueif thisMethodis a constructor for the class in which it is defined.booleanisDefault()booleanisNative()booleanisReturnTypeVoid()Convenience method to learn whether theMethodhas a primitivevoidreturn type.booleanisSynchronized()StringtoSignature()Convert thisMethodinto a string representing its unique signature.-
Methods inherited from interface org.jboss.forge.roaster.model.Abstractable
isAbstract
-
Methods inherited from interface org.jboss.forge.roaster.model.AnnotationTarget
getAnnotation, getAnnotation, getAnnotations, hasAnnotation, hasAnnotation
-
Methods inherited from interface org.jboss.forge.roaster.model.FinalCapable
isFinal
-
Methods inherited from interface org.jboss.forge.roaster.Internal
getInternal
-
Methods inherited from interface org.jboss.forge.roaster.model.StaticCapable
isStatic
-
Methods inherited from interface org.jboss.forge.roaster.model.VisibilityScoped
getVisibility, isPackagePrivate, isPrivate, isProtected, isPublic
-
-
-
-
Method Detail
-
isSynchronized
boolean isSynchronized()
- Returns:
trueif this method is synchronized
-
isNative
boolean isNative()
- Returns:
trueif this method is native
-
isConstructor
boolean isConstructor()
Returntrueif thisMethodis a constructor for the class in which it is defined.
-
isReturnTypeVoid
boolean isReturnTypeVoid()
Convenience method to learn whether theMethodhas a primitivevoidreturn type.
-
toSignature
String toSignature()
Convert thisMethodinto a string representing its unique signature.
-
getThrownExceptions
List<String> getThrownExceptions()
Get a list of qualified (if possible)Exceptionclass names thrown by this method.
-
isDefault
boolean isDefault()
- Returns:
trueif this method is declared as default (JDK 8)
-
-