|
Groovy 2.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.codehaus.groovy.runtime.DefaultGroovyMethodsSupport org.codehaus.groovy.vmplugin.v5.PluginDefaultGroovyMethods
public class PluginDefaultGroovyMethods extends DefaultGroovyMethodsSupport
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.
Method Summary | |
---|---|
static StringBuilder
|
leftShift(StringBuilder self, Object value)
Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuilder (Only works with JDK1.5 or later). |
static Object
|
next(Enum self)
This method is called by the ++ operator for enums. |
static String
|
plus(StringBuilder self, String value)
Appends a String to this StringBuilder (Only works with JDK1.5 or later). |
static Object
|
previous(Enum self)
This method is called by the -- operator for enums. |
static void
|
putAt(StringBuilder self, IntRange range, Object value)
Support the range subscript operator for StringBuilder (Only works with JDK1.5 or later). |
static void
|
putAt(StringBuilder self, EmptyRange range, Object value)
Support the range subscript operator for StringBuilder (Only works with JDK1.5 or later). |
static int
|
size(StringBuilder builder)
Standard Groovy size() method for StringBuilders (Only works with JDK1.5 or later). |
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Method Detail |
---|
public static StringBuilder leftShift(StringBuilder self, Object value)
self
- a StringBuildervalue
- a value to append
public static Object next(Enum self)
self
- an Enum
public static String plus(StringBuilder self, String value)
self
- a StringBuildervalue
- a String
public static Object previous(Enum self)
self
- an Enum
public static void putAt(StringBuilder self, IntRange range, Object value)
self
- a StringBuilderrange
- a Rangevalue
- the object that's toString() will be inserted
public static void putAt(StringBuilder self, EmptyRange range, Object value)
self
- a StringBuilderrange
- a Rangevalue
- the object that's toString() will be inserted
public static int size(StringBuilder builder)
builder
- a StringBuilder
Copyright © 2003-2013 The Codehaus. All rights reserved.