Package com.google.caliper.core
Class BenchmarkClassModel.MethodModel
- java.lang.Object
-
- com.google.caliper.core.BenchmarkClassModel.MethodModel
-
- All Implemented Interfaces:
Serializable
- Enclosing class:
- BenchmarkClassModel
public abstract static class BenchmarkClassModel.MethodModel extends Object implements Serializable
Model of a method on a benchmark class.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description MethodModel()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract com.google.common.collect.ImmutableSet<String>annotationTypes()Returns the types of annotations that are present on the method.abstract StringdeclaringClass()Returns the class that declared this method.abstract com.google.common.collect.ImmutableSet<String>exceptionTypes()Returns the types of exceptions the method declares that it may throw.booleanisAnnotationPresent(Class<?> annotationType)Returns whether or not the set ofannotationTypes()contains an annotation of the given type.booleanisAnnotationPresent(String annotationTypeName)Returns whether or not the set ofannotationTypes()contains an annotation with the given type name.abstract intmodifiers()Returns the modifiers for this method.abstract Stringname()Returns the name of this method.static BenchmarkClassModel.MethodModelof(Method method)Creates a newBenchmarkClassModel.MethodModelrepresenting the given method.abstract com.google.common.collect.ImmutableList<String>parameterTypes()Returns the method's parameter types.abstract com.google.common.base.Optional<String>returnType()Returns the method's return type, or absent for avoidmethod.
-
-
-
Method Detail
-
of
public static BenchmarkClassModel.MethodModel of(Method method)
Creates a newBenchmarkClassModel.MethodModelrepresenting the given method.
-
name
public abstract String name()
Returns the name of this method.
-
modifiers
public abstract int modifiers()
Returns the modifiers for this method.
-
declaringClass
public abstract String declaringClass()
Returns the class that declared this method.
-
returnType
public abstract com.google.common.base.Optional<String> returnType()
Returns the method's return type, or absent for avoidmethod.
-
parameterTypes
public abstract com.google.common.collect.ImmutableList<String> parameterTypes()
Returns the method's parameter types.
-
exceptionTypes
public abstract com.google.common.collect.ImmutableSet<String> exceptionTypes()
Returns the types of exceptions the method declares that it may throw.
-
annotationTypes
public abstract com.google.common.collect.ImmutableSet<String> annotationTypes()
Returns the types of annotations that are present on the method.
-
isAnnotationPresent
public final boolean isAnnotationPresent(String annotationTypeName)
Returns whether or not the set ofannotationTypes()contains an annotation with the given type name.
-
isAnnotationPresent
public final boolean isAnnotationPresent(Class<?> annotationType)
Returns whether or not the set ofannotationTypes()contains an annotation of the given type.
-
-