Class BenchmarkGeneratorUtils


  • class BenchmarkGeneratorUtils
    extends java.lang.Object
    • Field Detail

      • JMH_ANNOTATIONS

        private static final java.util.Collection<java.lang.Class<? extends java.lang.annotation.Annotation>> JMH_ANNOTATIONS
      • JMH_ANNOTATION_TARGETS

        private static final Multimap<java.lang.Class<? extends java.lang.annotation.Annotation>,​java.lang.annotation.ElementType> JMH_ANNOTATION_TARGETS
    • Constructor Detail

      • BenchmarkGeneratorUtils

        BenchmarkGeneratorUtils()
    • Method Detail

      • checkJavaIdentifier

        public static boolean checkJavaIdentifier​(java.lang.String id)
      • getMethodsAnnotatedWith

        public static <T extends java.lang.annotation.Annotation> java.util.Collection<MethodInfo> getMethodsAnnotatedWith​(GeneratorSource source,
                                                                                                                           java.lang.Class<T> annClass)
      • getClassesAnnotatedWith

        public static <T extends java.lang.annotation.Annotation> java.util.Collection<ClassInfo> getClassesAnnotatedWith​(GeneratorSource source,
                                                                                                                          java.lang.Class<T> annClass)
      • getFieldsAnnotatedWith

        public static <T extends java.lang.annotation.Annotation> java.util.Collection<FieldInfo> getFieldsAnnotatedWith​(GeneratorSource source,
                                                                                                                         java.lang.Class<T> annClass)
      • getAllFields

        public static java.util.Collection<FieldInfo> getAllFields​(ClassInfo ci)
      • getAllMethods

        public static java.util.Collection<MethodInfo> getAllMethods​(ClassInfo ci)
      • getAnnSuper

        public static <T extends java.lang.annotation.Annotation> T getAnnSuper​(ClassInfo ci,
                                                                                java.lang.Class<T> annClass)
      • getAnnSyntax

        public static <T extends java.lang.annotation.Annotation> T getAnnSyntax​(ClassInfo ci,
                                                                                 java.lang.Class<T> annClass)
      • getAnnSyntax

        public static <T extends java.lang.annotation.Annotation> T getAnnSyntax​(MethodInfo mi,
                                                                                 java.lang.Class<T> annClass)
      • getAnnSuper

        public static <T extends java.lang.annotation.Annotation> T getAnnSuper​(MethodInfo mi,
                                                                                java.lang.Class<T> annClass)
      • getAnnSuper

        public static <T extends java.lang.annotation.Annotation> T getAnnSuper​(MethodInfo mi,
                                                                                ClassInfo startCi,
                                                                                java.lang.Class<T> annClass)
      • getAnnSuperAll

        public static <T extends java.lang.annotation.Annotation> java.util.Collection<T> getAnnSuperAll​(MethodInfo mi,
                                                                                                         ClassInfo startCi,
                                                                                                         java.lang.Class<T> annClass)
      • getGeneratedName

        public static java.lang.String getGeneratedName​(ClassInfo ci)
      • getNestedNames

        public static java.lang.String getNestedNames​(ClassInfo ci)
      • checkAnnotations

        public static void checkAnnotations​(FieldInfo fi)
      • checkAnnotations

        public static void checkAnnotations​(ClassInfo ci)
      • checkAnnotations

        public static void checkAnnotations​(MethodInfo mi)
      • toParameterValues

        private static java.lang.String[] toParameterValues​(FieldInfo fi)

        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

        static void addParameterValuesToGroup​(ClassInfo host,
                                              MethodGroup group)
        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 @Params
        group - method group