Top Inners Fields Constructors Methods
org.jruby.common

public Class RubyWarnings

extends Object
implements IRubyWarnings, WarnCallback
Class Inheritance
All Implemented Interfaces
org.joni.WarnCallback, org.jruby.common.IRubyWarnings
Imports
java.util.EnumSet, .Set, org.joni.WarnCallback, org.jruby.Ruby, .RubyHash, .RubyModule, .RubyString, .RubySymbol, org.jruby.anno.JRubyMethod, org.jruby.ast.util.ArgsUtil, org.jruby.runtime.JavaSites, .Signature, .ThreadContext, org.jruby.runtime.backtrace.RubyStackTraceElement, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CachingCallSite, org.jruby.util.TypeConverter, org.jruby.util.func.TriFunction

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum

Field Summary

Modifier and TypeField and Description
private static final int
private final Set<IRubyWarnings.ID>
private final Ruby

Constructor Summary

AccessConstructor and Description
public
RubyWarnings(Ruby runtime)

Method Summary

Modifier and TypeMethod and Description
public static IRubyObject
public static RubyModule
private void
doWarn(String fileName, int lineNumber, CharSequence message, RubyWarnings.Category category)

public Ruby
public boolean
public boolean
public static IRubyObject
public static IRubyObject
private static JavaSites.WarningSites
public void
public <Context, State> void
warn(Context context, State state, TriFunction<Context, State, RubyStackTraceElement, String> callback)

public void
warn(IRubyWarnings.ID id, String fileName, int lineNumber, String message)

Implements org.jruby.common.IRubyWarnings.warn.

Prints a warning, unless $VERBOSE is nil.

public void
warn(String fileName, int lineNumber, String message)

public void
public void
warn(String message, RubyWarnings.Category category)

public void
warn(String file, int line, String message, RubyWarnings.Category category)

public void
warn(String filename, String message)

public static IRubyObject
public static IRubyObject
public static IRubyObject
public void
warn(IRubyWarnings.ID id, String fileName, String message)

Implements org.jruby.common.IRubyWarnings.warn.

Deprecated

Prints a warning, unless $VERBOSE is nil.

public static IRubyObject
warn(ThreadContext context, IRubyObject recv, IRubyObject[] args)
Deprecated

public void
warnDeprecated(IRubyWarnings.ID id, String message)
Deprecated since 10.0.

public void
public void
warnDeprecatedAlternate(String name, String alternate)
Deprecated since 10.0.

public void
warnDeprecatedForRemoval(String name, String version)
Deprecated since 10.0.

public void
public void
warnExperimental(String filename, int line, String message)
Deprecated

public void
public void
warning(String message)

Verbose mode warning methods, only warn in verbose mode

public void
public void
warning(IRubyWarnings.ID id, String fileName, int lineNumber, String message)

Implements org.jruby.common.IRubyWarnings.warning.

Prints a warning, only in verbose mode.

public void
warning(String fileName, int lineNumber, String message)

public void
public void
public void
public void
public static IRubyObject
warnWithCategory(ThreadContext context, IRubyObject errorString, IRubyObject category)

private void
private void
warnWithCategory(String filename, int line, String message, RubyWarnings.Category category)

private static IRubyObject
private static IRubyObject
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

LINE_NUMBER_NON_WARNINGback to summary
private static final int LINE_NUMBER_NON_WARNING
oncelersback to summary
private final Set<IRubyWarnings.ID> oncelers
runtimeback to summary
private final Ruby runtime

Constructor Detail

RubyWarningsback to summary
public RubyWarnings(Ruby runtime)

Method Detail

categoriesback to summary
public static IRubyObject categories(ThreadContext context, IRubyObject recv)
Annotations
@JRubyMethod
createWarningModuleback to summary
public static RubyModule createWarningModule(ThreadContext context)
doWarnback to summary
private void doWarn(String fileName, int lineNumber, CharSequence message, RubyWarnings.Category category)
getRuntimeback to summary
public Ruby getRuntime()

Implements org.jruby.common.IRubyWarnings.getRuntime.

Annotations
@Override
hasDeprecationWarningEnabledback to summary
public boolean hasDeprecationWarningEnabled()
isVerboseback to summary
public boolean isVerbose()

Implements org.jruby.common.IRubyWarnings.isVerbose.

Annotations
@Override
op_arefback to summary
public static IRubyObject op_aref(ThreadContext context, IRubyObject self, IRubyObject arg)
Annotations
@JRubyMethod
name:[]
op_asetback to summary
public static IRubyObject op_aset(ThreadContext context, IRubyObject self, IRubyObject arg, IRubyObject flag)
Annotations
@JRubyMethod
name:[]=
sitesback to summary
private static JavaSites.WarningSites sites(ThreadContext context)
warnback to summary
public void warn(String message)

Implements org.joni.WarnCallback.warn.

Annotations
@Override
warnback to summary
public <Context, State> void warn(Context context, State state, TriFunction<Context, State, RubyStackTraceElement, String> callback)
warnback to summary
public void warn(IRubyWarnings.ID id, String fileName, int lineNumber, String message)

Implements org.jruby.common.IRubyWarnings.warn.

Prints a warning, unless $VERBOSE is nil.

Annotations
@Override
warnback to summary
public void warn(String fileName, int lineNumber, String message)
warnback to summary
public void warn(IRubyWarnings.ID id, String message)

Implements org.jruby.common.IRubyWarnings.warn.

Annotations
@Override
warnback to summary
public void warn(String message, RubyWarnings.Category category)
warnback to summary
public void warn(String file, int line, String message, RubyWarnings.Category category)
warnback to summary
public void warn(String filename, String message)
warnback to summary
public static IRubyObject warn(ThreadContext context, IRubyObject recv, IRubyObject arg)
Annotations
@JRubyMethod
keywords:true
warnback to summary
public static IRubyObject warn(ThreadContext context, IRubyObject recv, IRubyObject arg0, IRubyObject arg1)
Annotations
@JRubyMethod
keywords:true
warnback to summary
public static IRubyObject warn(ThreadContext context, RubyString str)
warnback to summary
public void warn(IRubyWarnings.ID id, String fileName, String message)

Implements org.jruby.common.IRubyWarnings.warn.

Deprecated

Prints a warning, unless $VERBOSE is nil.

Annotations
@Override
@Deprecated
warnback to summary
public static IRubyObject warn(ThreadContext context, IRubyObject recv, IRubyObject[] args)

Deprecated

Annotations
@Deprecated
warnDeprecatedback to summary
public void warnDeprecated(IRubyWarnings.ID id, String message)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
warnDeprecatedback to summary
public void warnDeprecated(String message)
warnDeprecatedAlternateback to summary
public void warnDeprecatedAlternate(String name, String alternate)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
warnDeprecatedForRemovalback to summary
public void warnDeprecatedForRemoval(String name, String version)

Deprecated

since 10.0.

Annotations
@Deprecated
since:10.0
warnDeprecatedForRemovalAlternateback to summary
public void warnDeprecatedForRemovalAlternate(String name, String version, String alternate)
warnExperimentalback to summary
public void warnExperimental(String filename, int line, String message)

Deprecated

Annotations
@Deprecated
warnExperimentalback to summary
public void warnExperimental(String message)
warningback to summary
public void warning(String message)

Verbose mode warning methods, only warn in verbose mode

warningback to summary
public void warning(IRubyWarnings.ID id, String message)

Implements org.jruby.common.IRubyWarnings.warning.

Annotations
@Override
warningback to summary
public void warning(IRubyWarnings.ID id, String fileName, int lineNumber, String message)

Implements org.jruby.common.IRubyWarnings.warning.

Prints a warning, only in verbose mode.

Annotations
@Override
warningback to summary
public void warning(String fileName, int lineNumber, String message)
warningDeprecatedback to summary
public void warningDeprecated(String message)
warningDeprecatedback to summary
public void warningDeprecated(IRubyWarnings.ID id, String message)
warnOnceback to summary
public void warnOnce(IRubyWarnings.ID id, String message)
warnPerformanceback to summary
public void warnPerformance(String message)
warnWithCategoryback to summary
public static IRubyObject warnWithCategory(ThreadContext context, IRubyObject errorString, IRubyObject category)
warnWithCategoryback to summary
private void warnWithCategory(String message, RubyWarnings.Category category)
warnWithCategoryback to summary
private void warnWithCategory(String filename, int line, String message, RubyWarnings.Category category)
writeWarningDyncallback to summary
private static IRubyObject writeWarningDyncall(ThreadContext context, RubyString errorString, RubyWarnings.Category category)
writeWarningToErrorback to summary
private static IRubyObject writeWarningToError(ThreadContext context, RubyString errorString)
org.jruby.common back to summary

public final Enum RubyWarnings.Category

extends Enum<RubyWarnings.Category>
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final RubyWarnings.Category
public static final RubyWarnings.Category
private String
public static final RubyWarnings.Category

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static RubyWarnings.Category
public static RubyWarnings.Category
public static RubyWarnings.Category[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

DEPRECATEDback to summary
public static final RubyWarnings.Category DEPRECATED
EXPERIMENTALback to summary
public static final RubyWarnings.Category EXPERIMENTAL
idback to summary
private String id
PERFORMANCEback to summary
public static final RubyWarnings.Category PERFORMANCE

Constructor Detail

Categoryback to summary
private Category(String id)

Method Detail

fromIdback to summary
public static RubyWarnings.Category fromId(String id)
valueOfback to summary
public static RubyWarnings.Category valueOf(String name)
valuesback to summary
public static RubyWarnings.Category[] values()