Package org.jruby.api
Class Warn
java.lang.Object
org.jruby.api.Warn
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
warn
(ThreadContext context, String message) static void
warn
(ThreadContext context, String fileName, int lineNumber, String message) Produce a non-verbose warning with the specified file, line, and message.static void
warnDeprecated
(ThreadContext context, String message) Produce a warning if deprecated is set (e.g.static void
warnDeprecatedForRemoval
(ThreadContext context, String message, String version) Deprecated.static void
warnDeprecatedForRemovalAlternate
(ThreadContext context, String message, String version, String alternate) Produce a warning if deprecated is set (e.g.static void
warnExperimental
(ThreadContext context, String message) Produce a warning if experimental is set (e.g.static void
warning
(ThreadContext context, String message) static void
warningDeprecated
(ThreadContext context, String message) Produce a warning if deprecated is set (e.g.static void
warnPerformance
(ThreadContext context, String message) Produce a warning if performance is set (e.g.static void
warnReservedName
(ThreadContext context, String name, String version) Produce a warning for reserved constants that will be used by the Ruby language in a later version.
-
Constructor Details
-
Warn
public Warn()
-
-
Method Details
-
warn
-
warnDeprecated
Produce a warning if deprecated is set (e.g. Warning[:deprecated] = true)- Parameters:
context
- the current contextmessage
- to be displayed as a warning
-
warnDeprecatedForRemoval
@Deprecated(since="10.0") public static void warnDeprecatedForRemoval(ThreadContext context, String message, String version) Deprecated.Produce a warning if deprecated is set (e.g. Warning[:deprecated] = true)- Parameters:
context
- the current contextmessage
- to be displayed as a warningversion
- the version at which this deprecated feature will be removed
-
warnDeprecatedForRemovalAlternate
public static void warnDeprecatedForRemovalAlternate(ThreadContext context, String message, String version, String alternate) Produce a warning if deprecated is set (e.g. Warning[:deprecated] = true)- Parameters:
context
- the current contextmessage
- to be displayed as a warningversion
- the version at which this deprecated feature will be removedalternate
- the alternate feature that should be used instead
-
warnReservedName
Produce a warning for reserved constants that will be used by the Ruby language in a later version. This only works if deprecation warnings are enabled.- Parameters:
context
- the current contextname
- the reserved nameversion
- the version the name will be created in
-
warning
-
warningDeprecated
Produce a warning if deprecated is set (e.g. Warning[:deprecated] = true) and in verbose mode.- Parameters:
context
- the current contextmessage
- to be displayed as a warning
-
warnExperimental
Produce a warning if experimental is set (e.g. Warning[:experimental] = true)- Parameters:
context
- the current contextmessage
- to be displayed as a warning
-
warnPerformance
Produce a warning if performance is set (e.g. Warning[:performance] = true)- Parameters:
context
- the current contextmessage
- to be displayed as a warning
-
warn
Produce a non-verbose warning with the specified file, line, and message.- Parameters:
context
- the current contextfileName
- the filename for the warninglineNumber
- the line number for the warningmessage
- to be displayed as a warning
-