Top Description Constructors Methods
org.codehaus.groovy.vmplugin.v5

public Class PluginDefaultGroovyMethods

extends DefaultGroovyMethodsSupport
Class Inheritance
Annotations
@Deprecated
Imports
groovy.lang.EmptyRange, .GString, .IntRange, org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport, .InvokerHelper, .RangeInfo, java.lang.reflect.Method, java.util.Arrays

Deprecated

This class defines new Java 5 specific groovy methods which extend the normal JDK classes inside the Groovy environment. Static methods are used with the first parameter the destination class.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static StringBuilder

Returns:

the StringBuilder on which this operation was invoked
leftShift
(final StringBuilder
a StringBuilder
self
,
final Object
a value to append
value
)

Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuilder.

public static Object

Returns:

the next defined enum from the enum class
next
(final Enum<E extends Enum<E>>
an Enum
self
)

This method is called by the ++ operator for enums.

public static String

Returns:

a String
plus
(final StringBuilder
a StringBuilder
self
,
final String
a String
value
)

Appends a String to this StringBuilder.

public static Object

Returns:

the previous defined enum from the enum class
previous
(final Enum<E extends Enum<E>>
an Enum
self
)

This method is called by the -- operator for enums.

public static void
putAt(final StringBuilder
a StringBuilder
self
,
final IntRange
a Range
range
,
final Object
the object that's toString() will be inserted
value
)

Support the range subscript operator for StringBuilder.

public static void
putAt(final StringBuilder
a StringBuilder
self
,
final EmptyRange<T extends Comparable<T>>
a Range
range
,
final Object
the object that's toString() will be inserted
value
)

Support the range subscript operator for StringBuilder.

public static int

Returns:

the length of the StringBuilder
size
(final StringBuilder
a StringBuilder
builder
)

Standard Groovy size() method for StringBuilders.

Inherited from org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport:
cloneSimilarCollectioncloneSimilarMapcloseQuietlycloseWithWarningcreateSimilarArraycreateSimilarCollectioncreateSimilarCollectioncreateSimilarCollectioncreateSimilarListcreateSimilarMapcreateSimilarOrDefaultCollectioncreateSimilarQueuecreateSimilarSetnormaliseIndexsameTypesubListBorderssubListBorderswriteUTF16BomIfRequiredwriteUTF16BomIfRequiredwriteUTF16BomIfRequiredwriteUTF16BomIfRequired

Constructor Detail

PluginDefaultGroovyMethodsback to summary
public PluginDefaultGroovyMethods()

Method Detail

leftShiftback to summary
public static StringBuilder leftShift(final StringBuilder self, final Object value)

Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuilder.

Parameters
self:StringBuilder

a StringBuilder

value:Object

a value to append

Returns:StringBuilder

the StringBuilder on which this operation was invoked

nextback to summary
public static Object next(final Enum<E extends Enum<E>> self)

This method is called by the ++ operator for enums. It will invoke Groovy's default next behaviour for enums do not have their own next method.

Parameters
self:Enum<E extends Enum<E>>

an Enum

Returns:Object

the next defined enum from the enum class

plusback to summary
public static String plus(final StringBuilder self, final String value)

Appends a String to this StringBuilder.

Parameters
self:StringBuilder

a StringBuilder

value:String

a String

Returns:String

a String

previousback to summary
public static Object previous(final Enum<E extends Enum<E>> self)

This method is called by the -- operator for enums. It will invoke Groovy's default previous behaviour for enums that do not have their own previous method.

Parameters
self:Enum<E extends Enum<E>>

an Enum

Returns:Object

the previous defined enum from the enum class

putAtback to summary
public static void putAt(final StringBuilder self, final IntRange range, final Object value)

Support the range subscript operator for StringBuilder. Index values are treated as characters within the builder.

Parameters
self:StringBuilder

a StringBuilder

range:IntRange

a Range

value:Object

the object that's toString() will be inserted

putAtback to summary
public static void putAt(final StringBuilder self, final EmptyRange<T extends Comparable<T>> range, final Object value)

Support the range subscript operator for StringBuilder.

Parameters
self:StringBuilder

a StringBuilder

range:EmptyRange<T extends Comparable<T>>

a Range

value:Object

the object that's toString() will be inserted

sizeback to summary
public static int size(final StringBuilder builder)

Standard Groovy size() method for StringBuilders.

Parameters
builder:StringBuilder

a StringBuilder

Returns:int

the length of the StringBuilder