Top Description Constructors Methods
org.jruby.anno

public Class AnnotationHelper

extends Object
Class Inheritance
Imports
java.util.ArrayList, .Arrays, .HashSet, .List, .Map, .Set, .StringJoiner, java.util.function.BiConsumer, java.util.stream.Collectors

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
org.jruby.anno.AnnotationBinder

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
addMethodNamesToMap(Map<String, JRubyMethod> map, JRubyMethod jrubyMethod, String simpleName)

public static void
addMethodNamesToMap(final Map<String, JRubyMethod> map, JRubyMethod anno, final String simpleName, final String[] names, final String[] aliases)

public static void
addSubclassNames(List<String> classAndSubs, JRubyClass classAnno)

public static int
getArityValue(JRubyMethod anno, int actualRequired)

public static String
getCallConfigName(boolean frame, boolean scope)

Given a frame and scope requirement, return the name of the appropriate CallConfiguration.

public static String
getCallerCallConfigNameByAnno(JRubyMethod jrubyMethod)

Produce a CallConfiguration name that represents what *caller* methods must prepare for the method with this annotation.

public static void
groupFrameFields(Map<Set<FrameField>, List<String>> readGroups, Map<Set<FrameField>, List<String>> writeGroups, JRubyMethod anno, String simpleName)

public static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AnnotationHelperback to summary
private AnnotationHelper()

Method Detail

addMethodNamesToMapback to summary
public static void addMethodNamesToMap(Map<String, JRubyMethod> map, JRubyMethod jrubyMethod, String simpleName)
addMethodNamesToMapback to summary
public static void addMethodNamesToMap(final Map<String, JRubyMethod> map, JRubyMethod anno, final String simpleName, final String[] names, final String[] aliases)
addSubclassNamesback to summary
public static void addSubclassNames(List<String> classAndSubs, JRubyClass classAnno)
getArityValueback to summary
public static int getArityValue(JRubyMethod anno, int actualRequired)
getCallConfigNameback to summary
public static String getCallConfigName(boolean frame, boolean scope)

Given a frame and scope requirement, return the name of the appropriate CallConfiguration.

See Also
org.jruby.internal.runtime.methods.CallConfiguration#getCallConfig(boolean, boolean)
getCallerCallConfigNameByAnnoback to summary
public static String getCallerCallConfigNameByAnno(JRubyMethod jrubyMethod)

Produce a CallConfiguration name that represents what *caller* methods must prepare for the method with this annotation.

See Also
org.jruby.internal.runtime.methods.CallConfiguration#getCallerCallConfigByAnno(JRubyMethod)
groupFrameFieldsback to summary
public static void groupFrameFields(Map<Set<FrameField>, List<String>> readGroups, Map<Set<FrameField>, List<String>> writeGroups, JRubyMethod anno, String simpleName)
populateMethodIndexback to summary
public static void populateMethodIndex(Map<Set<FrameField>, List<String>> accessGroups, BiConsumer<Integer, String> action)