サクサク読めて、アプリ限定の機能も多数!
トップへ戻る
Pixel 9
groovy.codehaus.org
Larger examples of using Groovy in the Wild with a focus on applications or tasks rather than just showing off the features, APIs or modules: Accessing SQLServer using groovyAlternate Spring-Groovy-IntegrationAuto setup and download dependencies jarsBatch Image ManipulationCalculating a SHA1 hash for large filescommand line groovy doc or methods lookupCompute distance from Google Earth Path (in .k
Groovy ユーザガイドにようこそ。これがあなたの役に立てば幸いです。 ユーザガイドでは、あなたが既にGroovyをダウンロードしてインストールしていることを前提としています。もしそうでなければ Japanese Getting Started Guide を参照してください。 Japanese Advanced OOJapanese Groovy way to implement interfacesJapanese Annotations with GroovyJapanese Bean Scripting FrameworkJapanese ClosuresJapanese CollectionsJapanese Compile-time Metaprogramming - AST TransformationsJapanese Bindable and Vetoable tran
PLEAC presents a suite of common programming problems from the Perl Cookbook in various programming languages. Groovy contains a complete set of examples. Here are links to the these examples: Manipulating Strings, Numbers, Dates, Arrays, and Maps Pattern matching and text substitutions File Access File Contents Directories Subroutines References and Records Packages, Libraries, and Modules Classe
The following modules and contributions are currently available: COM Scripting — script Windows ActiveX and COM components with GroovyGantGFreeMarker — an integration of the FreeMarker template engine for GroovyGoogle Data Support — makes using the Google Data APIs easier from within GroovyGram — a simple xdoclet-like tool for processing doclet tags or Java 5 annotationsGraphicsBuilder — GraphicsB
Module Overview GroovyFX provides a Groovy binding for JavaFX 2.0. Features include a SceneGraphBuilder, a TimelineBuilder and Groovy DSL features to handle JavaFX objects, enumerations, binding, and paints/colors. The project is currently in Alpha 1.0 state. Download Project source can be downloaded from the GroovyFX Repository. The repository contains a Netbeans project and the Jar file can be c
The Groovy Advantage Groovy simplifies JUnit testing, making it more Groovy, in several ways, including: JUnit is built into the groovy runtime, so you can script JUnit tests for your Groovy and Java classes using Groovy syntax. Groovy provides many additional JUnit assertion statements (see below) Groovy unit tests are easily scriptable with Ant / Maven (see below) Groovy provides Groovy Mocks Se
Welcome to the Groovy Testing Guide. It contains information of relevance to those writing developer tests or systems and acceptance tests. Groovy MocksDeveloper Testing using Closures instead of MocksDeveloper Testing using Maps and Expandos instead of MocksMocking Static Methods using GroovyUsing MockFor and StubFor — used to assist (typically unit) testing of classes in isolationGMockIntegratin
Feature set Here are a few topics we're considering for Groovy 1.8 and beyond. internal runtime optimization for better performance extended command expression (GEP-3) for nicer Domain-Specific Languages capabilities extended annotations (closures parameters) more functional aspects to closures (currying, trampoline, memoization) support for joint compilation of AST transformations native JSON bui
30 Sept 2010 - 0.5.1 with OAuth Support!I've been meaning to implement this for a while now, especially since Twitter made the switch, and I use the Twitter API for a lot of unit tests. Now, OAuth is supported in HTTPBuilder 0.5.1 thanks to the Signpost framework. The implementation isn't perfect due to a limitation in HttpClient 4.0. However, once HttpClient 4.1 is released, I expect to update th
Executing External Processes Groovy provides a simple way to execute command line processes. Simply write the command line as a string and call the exectue() method. E.g., on a *nix machine (or a windows machine with appropriate *nix commands installed), you can execute this: The execute() method returns a java.lang.Process instance which will subsequently allow the in/out/err streams to be proces
Although at times, it may sound like a good idea to extend the syntax of Groovy to implement new features (like this is the case for instance for multiple assignments), most of the time, we can't just add a new keyword to the grammar, or create some new syntax construct to represent a new concept. However, with the idea of AST (Abstract Syntax Tree) Transformations, we are able to tackle new and i
Using design patterns with Java is a well-established topic. Design patterns also apply to Groovy: some patterns carry over directly (and can make use of normal Groovy syntax improvements for greater readability) some patterns are no longer required because they are built right into the language or because Groovy supports a better way of achieving the intent of the pattern some patterns that have
ConfigSlurper is a utility class within Groovy for writing properties file like scripts for performing configuration. Unlike regular Java properties files ConfigSlurper scripts support native Java types and are structured like a tree. Below is an example of how you could configure Log4j with a ConfigSlurper script: log4j.appender.stdout = "org.apache.log4j.ConsoleAppender" log4j.appender."stdout.l
What is Groovy Remote Control? Groovy remote control is a library for executing closures defined in one Groovy application to be executed in a different (possible remote) Groovy application. The current version is 0.1. What is it good for? The original driver for developing this library was to assist in functionally testing Grails applications (the plugin for Grails can be found here). Its use the
Groovy style and language feature guidelines for Java developers As a Java developer embarks on a Groovy adventure, he/she always has Java in mind, and progressively learn Groovy, a feature at a time, making him more productive and writing more idiomatic Groovy code. This document's purpose is to guide such a developer along the way, learning some common Groovy syntax style, learning new operators
SwingBuilderはSwingのGUIを作成するための簡潔な方法を提供します。その方法とはGroovyのイディオムとビルダーを使うことで実現します。複数の子コンポーネントを生成してSwingのメソッドを呼び出し、その子コンポーネントたちを親コンポーネントに関連付けるといった複雑なオブジェクトを作成するときの面倒な作業をビルダーが処理してくれます。その結果、あなたが書いたコードでは可読性とメンテナンス性が向上すると同時に、すべてのSwingコンポーネントを利用することができます。 SwingBuilderを使ったシンプルな例: import groovy.swing.SwingBuilder import java.awt.BorderLayout as BL def swing = new SwingBuilder() count = 0 def textlabel def fram
Grape (The Groovy Adaptable Packaging Engine または Groovy Advanced Packaging Engine) は、Groovyでgrab()呼び出しを可能にする基盤であり、Groovyのリポジトリベースのモジュールシステムを実現するためのIvyを活用した一連のクラスです。これによって、開発者が何らかのライブラリを必須とするスクリプトを書いても、そのスクリプトのみをリリースすることが可能になります。スクリプトが、IbiblioやCodehaus、java.netのような既存のリポジトリに基づいて実行されるとき、Grapeは(実行時に)必要に応じて指定されたライブラリやそのすべての依存物をダウンロードし、リンクします。 基本 Grapeは、モジュールのバージョン識別に関しては(用語の変更はありますが)、Ivyのやり方に従っています。 gr
Description Compiles Groovy source files and, if the joint compilation option is used, Java source files. Required taskdef Assuming groovy-all-VERSION.jar is in my.classpath you will need to declare this task at some point in the build.xml prior to the groovyc task being invoked.
Groovy has excellent support for Testing with Unit Testing (GroovyTestCase adds extra capabilities to TestCase from JUnit 3.8.2) and Mocking capabilities built right in. Currently, there are no special Groovy extensions for JUnit 4 but it's easy to use so long as you are using Groovy 1.5+ and Java 5+ (a requirement for annotations/Junit 4.x). Here are some examples. Make sure you are using at leas
このノートの対象 下記のリリースノートは、最新のメジャーリリースであるGroovy 1.7の新機能を対象にしたものです。 IDEサポート Groovy 1.7の新機能の紹介に入る前に、Groovy(Griffon, Gradle, Gant, Grails等も含む)のIDEサポートの大きな前進について述べさせてください。主要なIDEすべて(Eclipse, IntelliJ IDEA, NetBeans)が、素晴らしいレベルの言語サポートを提供します。当初は最も欠けていたEclipseのサポートも、SpringSourceのEclipseチームの努力の結果、今ではクロス言語リファクタリング、Groovy固有コード補完など、Java/Groovy混在アプリケーションの開発のための優れた環境を持つことができました。
def clos = { println "hello! } println "Executing the closure:" clos() //"hello!" を出力 上の例で、クロージャが定義されたときではなく、 呼ばれた ときに "hello!" が出力されていることに注意してください。 クロージャは、定義されたスコープ内で変数に「束縛」することもできます: def localMethod() { def localVariable = new java.util.Date() return { println localVariable } } def clos = localMethod() println "Executing the closure:" clos() //"localVariable" が定義された時点の日時を出力
forループ Groovyのforフープはかなりシンプルで、配列、コレクション、Mapなどが使えます。 注意: 標準のforループはbeta-10まで実装されていませんでした。 // for (int i = 0; i < 5; ++i) // はbeta-10まで実装されていませんでした。 // Rangeの終わりまで繰り返す def x = 0 for ( i in 0..9 ) { x += i } assert x == 45 // Listの終わりまで繰り返す x = 0 for ( i in [0, 1, 2, 3, 4] ) { x += i } assert x == 10 // 配列の終わりまで繰り返す array = (0..4).toArray() x = 0 for ( i in array ) { x += i } assert x == 10 // Mapの
Introduction Groovy supports multiple ways to generate text dynamically including GStrings, printf if you are using Java 5, and MarkupBuilder just to name a few. In addition to these, there is a dedicated template framework which is well-suited to applications where the text to be generated follows the form of a static template. Template framework The template framework in Groovy consists of a Tem
. You'll need a fairly recent jEdit distribution. Right now BSF isn't yet released with inbuilt Groovy support so you have to add the following code to the startup script in
Java環境を設定 GroovyはJavaが必要です、したがって利用可能なバージョンを取得してください (1.4かそれ以上が必要)。ここでは、まだJavaをインストールしていない場合のステップを記述します: http://java.sun.com webサイトから最新のJavaディストリビューションを取得 インストーラを実行 JAVA_HOMEの環境変数を設定。Windows上では、以下のステップに従ってください: システムコントロールパネルを開く 拡張タブをクリック 環境変数ボタンをクリック JAVA_HOMEという名前の新しいシステム変数を追加し、Javaがインストールされたディレクトリを値に設定(例えば、C:\Program Files\Java\jdk1.5.0_04) 任意でシステムパスとして、%JAVA_HOME%\binを追加 (注意: システム環境変数を設定する別の方法と
groovy-mode for (X)Emacs Jeremy Rayner created a groovy-mode for (X)Emacs, which has syntax hilighting, recognises curly brace indentation (just use the tab key), and doesn't panic about optional semicolons. He tested it in Emacs on Mac OSX 10.3, and others use it and it isn't painful. Russel Winder has begun an alternative version of groovy-mode as a derived mode in CC Mode. Currently, this has
次のページ
このページを最初にブックマークしてみませんか?
『Groovy - Home』の新着エントリーを見る
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く