Package org.openjdk.jmh.generators.core
Class BenchmarkGeneratorUtils
java.lang.Object
org.openjdk.jmh.generators.core.BenchmarkGeneratorUtils
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Multimap
<Class<? extends Annotation>, ElementType> private static final Collection
<Class<? extends Annotation>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
addParameterValuesToGroup
(ClassInfo host, MethodGroup group) Compute the parameter space given by@Param
annotations and add all them to the group.static void
static void
static void
static boolean
static Collection
<FieldInfo> static Collection
<MethodInfo> static <T extends Annotation>
TgetAnnSuper
(ClassInfo ci, Class<T> annClass) static <T extends Annotation>
TgetAnnSuper
(MethodInfo mi, Class<T> annClass) static <T extends Annotation>
TgetAnnSuper
(MethodInfo mi, ClassInfo startCi, Class<T> annClass) static <T extends Annotation>
Collection<T> getAnnSuperAll
(MethodInfo mi, ClassInfo startCi, Class<T> annClass) static <T extends Annotation>
TgetAnnSyntax
(ClassInfo ci, Class<T> annClass) static <T extends Annotation>
TgetAnnSyntax
(MethodInfo mi, Class<T> annClass) static <T extends Annotation>
Collection<ClassInfo> getClassesAnnotatedWith
(GeneratorSource source, Class<T> annClass) static <T extends Annotation>
Collection<FieldInfo> getFieldsAnnotatedWith
(GeneratorSource source, Class<T> annClass) static String
static Collection
<MethodInfo> getMethods
(ClassInfo ci) static <T extends Annotation>
Collection<MethodInfo> getMethodsAnnotatedWith
(GeneratorSource source, Class<T> annClass) static String
private static String[]
Gets the parameter values to be used for this field.
-
Field Details
-
JMH_ANNOTATIONS
-
JMH_ANNOTATION_TARGETS
-
-
Constructor Details
-
BenchmarkGeneratorUtils
BenchmarkGeneratorUtils()
-
-
Method Details
-
checkJavaIdentifier
-
getMethodsAnnotatedWith
public static <T extends Annotation> Collection<MethodInfo> getMethodsAnnotatedWith(GeneratorSource source, Class<T> annClass) -
getClassesAnnotatedWith
public static <T extends Annotation> Collection<ClassInfo> getClassesAnnotatedWith(GeneratorSource source, Class<T> annClass) -
getFieldsAnnotatedWith
public static <T extends Annotation> Collection<FieldInfo> getFieldsAnnotatedWith(GeneratorSource source, Class<T> annClass) -
getAllFields
-
getAllMethods
-
getMethods
-
getAnnSuper
-
getAnnSyntax
-
getAnnSyntax
-
getAnnSuper
-
getAnnSuper
public static <T extends Annotation> T getAnnSuper(MethodInfo mi, ClassInfo startCi, Class<T> annClass) -
getAnnSuperAll
public static <T extends Annotation> Collection<T> getAnnSuperAll(MethodInfo mi, ClassInfo startCi, Class<T> annClass) -
getGeneratedName
-
getNestedNames
-
checkAnnotations
-
checkAnnotations
-
checkAnnotations
-
toParameterValues
Gets the parameter values to be used for this field. In most cases this will be the values declared in the
@Param
annotation.For an enum field type, an empty parameter list will be resolved to be the full list of enum constants of that type.
- Parameters:
fi
- type of the field for which to find parameters- Returns:
- string values representing the actual parameters
-
addParameterValuesToGroup
Compute the parameter space given by@Param
annotations and add all them to the group.- Parameters:
host
- type of the state@State
in which to find@Param
sgroup
- method group
-