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 java.lang.StringgetBody()Get the inner body of thisMethodjava.util.List<? extends Parameter<O>>getParameters()Get a list of thisMethod's parameters.Type<O>getReturnType()java.util.List<java.lang.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()java.lang.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
-
getBody
java.lang.String getBody()
Get the inner body of thisMethod
-
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.
-
getParameters
java.util.List<? extends Parameter<O>> getParameters()
Get a list of thisMethod's parameters.
-
toSignature
java.lang.String toSignature()
Convert thisMethodinto a string representing its unique signature.
-
getThrownExceptions
java.util.List<java.lang.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)
-
-