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
Modifier and TypeMethodDescriptiongetBody()Get the inner body of thisMethodGet a list of thisMethod's parameters.Get a list of qualified (if possible)Exceptionclass names thrown by this method.booleanReturntrueif thisMethodis a constructor for the class in which it is defined.booleanbooleanisNative()booleanConvenience method to learn whether theMethodhas a primitivevoidreturn type.booleanConvert thisMethodinto a string representing its unique signature.Methods inherited from interface org.jboss.forge.roaster.model.Abstractable
isAbstractMethods inherited from interface org.jboss.forge.roaster.model.AnnotationTarget
getAnnotation, getAnnotation, getAnnotations, hasAnnotation, hasAnnotationMethods inherited from interface org.jboss.forge.roaster.model.FinalCapable
isFinalMethods inherited from interface org.jboss.forge.roaster.Internal
getInternalMethods inherited from interface org.jboss.forge.roaster.model.StaticCapable
isStaticMethods inherited from interface org.jboss.forge.roaster.model.VisibilityScoped
getVisibility, isPackagePrivate, isPrivate, isProtected, isPublic
-
Method Details
-
isSynchronized
boolean isSynchronized()- Returns:
trueif this method is synchronized
-
isNative
boolean isNative()- Returns:
trueif this method is native
-
getBody
String getBody()Get the inner body of thisMethod -
isConstructor
boolean isConstructor()Returntrueif thisMethodis a constructor for the class in which it is defined. -
getReturnType
-
isReturnTypeVoid
boolean isReturnTypeVoid()Convenience method to learn whether theMethodhas a primitivevoidreturn type. -
getParameters
Get a list of thisMethod's parameters. -
toSignature
String toSignature()Convert thisMethodinto a string representing its unique signature. -
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)
-