org.jruby.anno.JRubyMethod.reads()方法的使用及代码示例

x33g5p2x  于2022-01-22 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(113)

本文整理了Java中org.jruby.anno.JRubyMethod.reads()方法的一些代码示例,展示了JRubyMethod.reads()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JRubyMethod.reads()方法的具体详情如下:
包路径:org.jruby.anno.JRubyMethod
类名称:JRubyMethod
方法名:reads

JRubyMethod.reads介绍

暂无

代码示例

代码示例来源:origin: org.jruby/jruby-complete

public static void groupFrameFields(Map<Set<FrameField>, List<String>> readGroups, Map<Set<FrameField>, List<String>> writeGroups, JRubyMethod anno, String simpleName) {
  if (anno.reads().length > 0) {
    Set<FrameField> reads = new HashSet<>(Arrays.asList(anno.reads()));
    List<String> nameList = readGroups.get(reads);
    if (nameList == null) readGroups.put(reads, nameList = new ArrayList<>());
    if (anno.name().length == 0) {
      nameList.add(simpleName);
    } else {
      nameList.addAll(Arrays.asList(anno.name()));
    }
  }
  if (anno.writes().length > 0) {
    Set<FrameField> writes = new HashSet<>(Arrays.asList(anno.writes()));
    List<String> nameList = writeGroups.get(writes);
    if (nameList == null) writeGroups.put(writes, nameList = new ArrayList<>());
    if (anno.name().length == 0) {
      nameList.add(simpleName);
    } else {
      nameList.addAll(Arrays.asList(anno.name()));
    }
  }
}

代码示例来源:origin: org.jruby/jruby-core

public static void groupFrameFields(Map<Set<FrameField>, List<String>> readGroups, Map<Set<FrameField>, List<String>> writeGroups, JRubyMethod anno, String simpleName) {
  if (anno.reads().length > 0) {
    Set<FrameField> reads = new HashSet<>(Arrays.asList(anno.reads()));
    List<String> nameList = readGroups.get(reads);
    if (nameList == null) readGroups.put(reads, nameList = new ArrayList<>());
    if (anno.name().length == 0) {
      nameList.add(simpleName);
    } else {
      nameList.addAll(Arrays.asList(anno.name()));
    }
  }
  if (anno.writes().length > 0) {
    Set<FrameField> writes = new HashSet<>(Arrays.asList(anno.writes()));
    List<String> nameList = writeGroups.get(writes);
    if (nameList == null) writeGroups.put(writes, nameList = new ArrayList<>());
    if (anno.name().length == 0) {
      nameList.add(simpleName);
    } else {
      nameList.addAll(Arrays.asList(anno.name()));
    }
  }
}

代码示例来源:origin: org.jruby/jruby-complete

if (anno.reads().length > 0 && readGroups == Collections.EMPTY_MAP) readGroups = new HashMap<>();
if (anno.writes().length > 0 && writeGroups == Collections.EMPTY_MAP) writeGroups = new HashMap<>();

代码示例来源:origin: org.jruby/jruby-core

if (anno.reads().length > 0 && readGroups == Collections.EMPTY_MAP) readGroups = new HashMap<>();
if (anno.writes().length > 0 && writeGroups == Collections.EMPTY_MAP) writeGroups = new HashMap<>();

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

scope = true;
for (FrameField field : anno.reads()) {
  frame |= field.needsFrame();
  scope |= field.needsScope();

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

scope = true;
for (FrameField field : anno.reads()) {
  frame |= field.needsFrame();
  scope |= field.needsScope();

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

if (anno.frame() || (anno.reads() != null && anno.reads().length >= 1) || (anno.writes() != null && anno.writes().length >= 1)) {

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

if (anno.frame() || (anno.reads() != null && anno.reads().length >= 1) || (anno.writes() != null && anno.writes().length >= 1)) {

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Produce a CallConfiguration name that represents what *caller* methods must prepare for
 * the method with this annotation.
 *
 * @see org.jruby.internal.runtime.methods.CallConfiguration#getCallerCallConfigByAnno(JRubyMethod)
 */
public static String getCallerCallConfigNameByAnno(JRubyMethod jrubyMethod) {
  boolean frame = false;
  boolean scope = false;
  for (FrameField field : jrubyMethod.reads()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  for (FrameField field : jrubyMethod.writes()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  return getCallConfigName(frame, scope);
}

代码示例来源:origin: org.jruby/jruby-core

/**
 * Produce a CallConfiguration that represents what *caller* methods must prepare for
 * the method with this annotation.
 *
 * @see org.jruby.anno.AnnotationHelper#getCallerCallConfigNameByAnno(org.jruby.anno.JRubyMethod)
 */
public static CallConfiguration getCallerCallConfigByAnno(JRubyMethod jrubyMethod) {
  boolean frame = false;
  boolean scope = false;
  for (FrameField field : jrubyMethod.reads()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  for (FrameField field : jrubyMethod.writes()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  return getCallConfig(frame, scope);
}

代码示例来源:origin: org.jruby/jruby-complete

/**
 * Produce a CallConfiguration that represents what *caller* methods must prepare for
 * the method with this annotation.
 *
 * @see org.jruby.anno.AnnotationHelper#getCallerCallConfigNameByAnno(org.jruby.anno.JRubyMethod)
 */
public static CallConfiguration getCallerCallConfigByAnno(JRubyMethod jrubyMethod) {
  boolean frame = false;
  boolean scope = false;
  for (FrameField field : jrubyMethod.reads()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  for (FrameField field : jrubyMethod.writes()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  return getCallConfig(frame, scope);
}

代码示例来源:origin: org.jruby/jruby-core

/**
 * Produce a CallConfiguration name that represents what *caller* methods must prepare for
 * the method with this annotation.
 *
 * @see org.jruby.internal.runtime.methods.CallConfiguration#getCallerCallConfigByAnno(JRubyMethod)
 */
public static String getCallerCallConfigNameByAnno(JRubyMethod jrubyMethod) {
  boolean frame = false;
  boolean scope = false;
  for (FrameField field : jrubyMethod.reads()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  for (FrameField field : jrubyMethod.writes()) {
    frame |= field.needsFrame();
    scope |= field.needsScope();
  }
  return getCallConfigName(frame, scope);
}

代码示例来源:origin: org.jruby/jruby-core

if (anno.reads().length > 0 || anno.writes().length > 0) {
  MethodIndex.addMethodReadFields(id, anno.reads());
  MethodIndex.addMethodWriteFields(id, anno.writes());

代码示例来源:origin: org.jruby/jruby-complete

if (anno.reads().length > 0 || anno.writes().length > 0) {
  MethodIndex.addMethodReadFields(id, anno.reads());
  MethodIndex.addMethodWriteFields(id, anno.writes());

代码示例来源:origin: org.kill-bill.billing/killbill-osgi-bundles-jruby

scope = true;
for (FrameField field : jrubyMethod.reads()) {
  frame |= field.needsFrame();
  scope |= field.needsScope();

代码示例来源:origin: com.ning.billing/killbill-osgi-bundles-jruby

scope = true;
for (FrameField field : jrubyMethod.reads()) {
  frame |= field.needsFrame();
  scope |= field.needsScope();

相关文章