Package org.jruby.anno
Class AnnotationHelper
java.lang.Object
org.jruby.anno.AnnotationHelper
Utility methods for generating bindings at build time. Used by AnnotationBinder.
NOTE: This class must ONLY reference classes in the org.jruby.anno package, to avoid forcing
a transitive dependency on any runtime JRuby classes!
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addMethodNamesToMap
(Map<String, JRubyMethod> map, JRubyMethod jrubyMethod, String simpleName) static void
addMethodNamesToMap
(Map<String, JRubyMethod> map, JRubyMethod anno, String simpleName, String[] names, String[] aliases) static void
addSubclassNames
(List<String> classAndSubs, JRubyClass classAnno) static int
getArityValue
(JRubyMethod anno, int actualRequired) static String
getCallConfigName
(boolean frame, boolean scope) Given a frame and scope requirement, return the name of the appropriate CallConfiguration.static String
getCallerCallConfigNameByAnno
(JRubyMethod jrubyMethod) Produce a CallConfiguration name that represents what *caller* methods must prepare for the method with this annotation.static void
groupFrameFields
(Map<Set<FrameField>, List<String>> readGroups, Map<Set<FrameField>, List<String>> writeGroups, JRubyMethod anno, String simpleName) static void
populateMethodIndex
(Map<Set<FrameField>, List<String>> accessGroups, BiConsumer<Integer, String> action)
-
Method Details
-
addMethodNamesToMap
public static void addMethodNamesToMap(Map<String, JRubyMethod> map, JRubyMethod jrubyMethod, String simpleName) -
addMethodNamesToMap
public static void addMethodNamesToMap(Map<String, JRubyMethod> map, JRubyMethod anno, String simpleName, String[] names, String[] aliases) -
getArityValue
-
getCallerCallConfigNameByAnno
Produce a CallConfiguration name that represents what *caller* methods must prepare for the method with this annotation.- See Also:
-
getCallConfigName
Given a frame and scope requirement, return the name of the appropriate CallConfiguration.- See Also:
-
groupFrameFields
public static void groupFrameFields(Map<Set<FrameField>, List<String>> readGroups, Map<Set<FrameField>, List<String>> writeGroups, JRubyMethod anno, String simpleName) -
populateMethodIndex
public static void populateMethodIndex(Map<Set<FrameField>, List<String>> accessGroups, BiConsumer<Integer, String> action) -
addSubclassNames
-