Weitere ähnliche Inhalte
Ähnlich wie GroovyConsole2
Ähnlich wie GroovyConsole2 (20)
Mehr von Kiyotaka Oku (20)
Kürzlich hochgeladen (20)
GroovyConsole2
- 2. ( )
id:kiy0taka @kiy0taka
Grails/Groovy
Jenkins
jQuery jQueryUI Terminal
TEPCO MongoDB
- 6. class Person {
String name
int age
}
def p1 = new Person(name:'Kiyotaka Oku', age:31)
def p2 = new Person(name:'Kiyotaka Oku', age:31)
assert p1 == p2
assert p1 == p2
| | |
| | Person@20e5f01b
| false
Person@57f68d7c
- 9. @Log @Commons @Log4j @Slf4j
@Field @PackageScope
@AutoClone @AutoExternalizable
@ThreadInterrupt @TimedInterrupt
@ConditionalInterrupt @ToString
@EqualsAndHashCode
@TupleConstructor
@Canonical @InheritConstructors
@WithReadLock @WithWriteLock
@ListenerList
- 15. YutoriConsole.groovy
import javax.swing.UIManager
import groovy.ui.Console
import org.codehaus.groovy.control.CompilerConfiguration
import org.codehaus.groovy.control.customizers.ASTTransformationCustomizer
import groovy.transform.*
def transformations = [ThreadInterrupt, Canonical]
Console.metaClass.newScript = { ClassLoader parent, Binding binding ->
def config = new CompilerConfiguration()
config.addCompilationCustomizers(*transformations.collect{
new ASTTransformationCustomizer(it)})
delegate.shell = new GroovyShell(parent, binding, config)
}
UIManager.lookAndFeel = UIManager.systemLookAndFeelClassName
new Console(Console.class.classLoader.getRootLoader()).run()
https://gist.github.com/1059105