Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Groovy 2 Cookbook

You're reading from   Groovy 2 Cookbook Java and Groovy go together like ham and eggs, and this book is a great opportunity to learn how to exploit Groovy 2 to the full. Packed with recipes, both intermediate and advanced, it's a great way to speed up and modernize your programming.

Arrow left icon
Product type Paperback
Published in Oct 2013
Publisher Packt
ISBN-13 9781849519366
Length 394 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Luciano Fiandesio Luciano Fiandesio
Author Profile Icon Luciano Fiandesio
Luciano Fiandesio
Andrey Adamovich Andrey Adamovich
Author Profile Icon Andrey Adamovich
Andrey Adamovich
Arrow right icon
View More author details
Toc

Table of Contents (17) Chapters Close

Groovy 2 Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Groovy FREE CHAPTER 2. Using Groovy Ecosystem 3. Using Groovy Language Features 4. Working with Files in Groovy 5. Working with XML in Groovy 6. Working with JSON in Groovy 7. Working with Databases in Groovy 8. Working with Web Services in Groovy 9. Metaprogramming and DSLs in Groovy 10. Concurrent Programming in Groovy Index

Index

A

  • @AutoClone annotation
    • about / Adding the cloning functionality to Groovy Beans, There's more...
    • using / How to do it...
  • Abstract Syntax Tree (AST)
    • about / Introduction
  • actors
    • used, for building message-based concurrency / Using actors to build message-based concurrency, How to do it..., How it works...
  • Ant script targets
    • clean target / How it works...
  • Ant tool
    • about / Introduction
  • Apache Ant
    • about / Integrating Groovy into the build process using Ant
    • used, for integrating Groovy / Integrating Groovy into the build process using Ant, Getting ready, How to do it...
  • Apache Cassandra
    • accessing, Groovy used / Using Groovy to access Apache Cassandra, Getting ready, How it works...
    • about / Using Groovy to access Apache Cassandra
    • features / Using Groovy to access Apache Cassandra
    • downloading / Getting ready
  • Apache HttpClient
    • about / Issuing a REST request and parsing a response
  • Apache Ivy
    • URL / See also
  • Apache Maven
    • URL / Integrating Groovy into the build process using Maven
    • used, for integrating Groovy / Integrating Groovy into the build process using Maven, Getting ready, How to do it..., How it works..., There's more...
    • about / Integrating Groovy into the build process using Maven
    • download and installation instructions / Getting ready
  • ArrayList class
    • about / How to do it...
  • AST (Abstract Syntax Tree) / How it works...
  • AST transformation
    • about / Adding a caching functionality around methods
    • types / Adding a caching functionality around methods
    • localtransformation / Adding a caching functionality around methods
    • global transformation / Adding a caching functionality around methods
  • Atom feeds
    • consuming / Consuming RSS and Atom feeds, How to do it..., There's more...
  • attribute() method / How it works...
  • AutoCloneStyle.SERIALIZATION style
    • about / There's more...
  • automatic logging
    • adding, to Groovy classes / Adding automatic logging to Groovy classes, There's more...

B

  • basic authentication
    • about / Using basic authentication for web service security
    • using, for web service security / Using basic authentication for web service security, How it works...
  • Bing Map Service
    • URL / Getting ready
  • BLOB/CLOB
    • reading, from database / Reading BLOB/CLOB from a database, How to do it..., There's more...
  • build.xml script
    • properties / How it works...
    • about / How it works...

C

  • @Canonical annotation
    • about / There's more...
  • caching functionality
    • adding, around methods / Adding a caching functionality around methods, Getting ready, How to do it..., How it works...
  • calculateFrequency function / How it works...
  • callAsync method
    • about / How it works...
  • CallGroovyUsingGroovyShell class / How to do it...
  • Checkstyle
    • URL / Checking Groovy code's quality with CodeNarc
  • Clojure / Embedding Groovy into Java
  • cloning functionality
    • adding, to Groovy Beans / Adding the cloning functionality to Groovy Beans
  • code, Groovy
    • compiling / Compiling Groovy code, Getting ready, How it works...
    • quality, checking with CodeNarc / Checking Groovy code's quality with CodeNarc
    • defining, as data / Defining code as data in Groovy, How to do it..., There's more...
  • CodeNarc
    • used, for checking code quality / Checking Groovy code's quality with CodeNarc, Getting ready
    • URL / Checking Groovy code's quality with CodeNarc
    • working / How it works...
    • violations / How it works...
    • features / There's more...
  • CodeNarc's Ant task
    • URL / See also
  • CodeNarc's home page
    • URL / See also
  • CodeNarc rules
    • URL / See also
  • collect() method
    • about / How it works...
  • collectEntries method / There's more...
  • collection
    • about / Getting ready
  • collections
    • processing concurrently / Processing collections concurrently, How to do it..., How it works...
  • collectParallel method / How it works...
  • command-line text file editor
    • Groovy, using as / Using Groovy as a command-line text file editor, How it works...
  • command line
    • Groovy code, executing from / Executing Groovy code from the command line, There's more...
  • complex URLs
    • constructing / Constructing and modifying complex URLs, How to do it...
    • modifying / Constructing and modifying complex URLs, How to do it...
  • constructors
    • inheriting, in Groovy classes / Inheriting constructors in Groovy classes
  • content
    • downloading, from internet / Downloading content from the Internet, How it works...
  • Copy Constructor pattern
    • about / There's more...
  • createSchema method
    • about / Getting ready
  • CriminalServiceWithDataflow class / How it works...
  • curry function / There's more...
  • CustomerDao / Getting ready
  • CustomerService class / Getting ready

D

  • @Delegate annotation
    • using / There's more...
  • database table
    • creating / Creating a database table, How to do it...
  • Data Definition Language (DDL)
    • about / Creating a database table
  • Dataflow concurrency
    • about / Using dataflow variables for lazy evaluation
    • leveraging / How to do it...
  • dataflow variables
    • using, for lazy evaluation / Using dataflow variables for lazy evaluation, How to do it..., How it works...
  • DataPopulationStrategy instance
    • code / How it works...
  • Datasource object
    • about / How it works...
  • data structures
    • defining, as code / Defining data structures as code in Groovy, Getting ready, How to do it..., How it works...
  • deadlock
    • about / Using STM to atomically update fields
  • declareNamespace method
    • about / How it works...
  • de facto data
    • about / Converting JSON message to XML
  • delegate method
    • about / How it works...
  • deleteDir method / How it works...
  • delete method / How it works...
  • dependencies management
    • simplifying, Grape used / Simplifying dependency management with Grape, How it works..., There's more...
  • depthFirst() method
    • about / How to do it...
  • directory
    • deleting / Deleting a file or directory, Getting ready, How it works...
  • directorySize() method
    • about / How it works...
  • directory tree
    • ways, of walking through / Walking through a directory recursively, How it works...
  • documentation, Groovy code
    • generating / Generating documentation for Groovy code, Getting ready, How to do it...
  • Domain-Specific Language (DSL)
    • about / Introduction
  • DSL
    • about / DSL for executing commands over SSH
    • defining, for executing remote SSH commands / DSL for executing commands over SSH, How to do it..., How it works...
    • defining, for generating reports from log files / DSL for generating reports from logfiles, Getting ready, How to do it..., How it works...
    • features / There's more...
  • DSLs (Domain Specific Languages)
    • about / Defining data structures as code in Groovy
  • dumpZipContent function / How it works...
  • dynamic code
    • type checking rules, defining for / Defining type-checking rules for dynamic code, Getting ready, How to do it...

E

  • @EqualsAndHashCode annotation
    • about / There's more...
  • E4X (ECMAScript for XML) / Searching in XML with GPath
  • eachByte() method / There's more...
  • eachDir method / There's more...
  • eachDirRecurse method / How to do it...
  • eachFile method / There's more...
  • eachLine() method / How to do it...
  • Eclipse
    • about / Configuring Groovy in Eclipse
    • Groovy, configuring / Configuring Groovy in Eclipse, How to do it..., How it works..., There's more...
  • Eclipse plugin, for Groovy
    • downloading / Configuring Groovy in Eclipse
  • ECommerceTestDataBuilder class
    • about / How to do it...
  • equals method
    • about / There's more...
  • Excel file
    • reading / Reading an Excel file, How to do it..., How it works...
  • execute() method / How it works...
  • executeInsert method
    • about / How it works...
  • ExpandoMetaClass
    • used, for extending classes / Dynamically extending classes with new methods
    • about / Dynamically extending classes with new methods

F

  • FeedParser class
    • about / How it works...
  • fetchData function / How it works...
  • fetchData method
    • about / How it works...
  • fields
    • updating, STM used / Using STM to atomically update fields, How to do it..., How it works...
  • file attributes
    • changing, on Windows / Changing file attributes on Windows, Getting ready, How it works...
  • files
    • about / Introduction
    • reading from / Reading from a file, How it works...
    • text file, reading line by line / Reading a text file line by line, There's more...
    • word-based analysis, of text file / Processing every word in a text file, How to do it...
    • writing to / Writing to a file, How to do it..., How it works...
    • text file content, filtering / Filtering a text file's content
    • deleting / Deleting a file or directory
    • searching / How to do it..., How it works...
    • data, reading from ZIP file / Reading data from a ZIP file, There's more...
    • Excel file, reading / Reading an Excel file, How to do it...
    • data, extracting from PDF / Extracting data from a PDF, Getting ready, How to do it..., How it works..., There's more...
    • downloading concurrently / Downloading files concurrently, How to do it...
  • filterLine method / How to do it...
  • findAll method
    • about / How to do it...
  • FindBugs
    • URL / Checking Groovy code's quality with CodeNarc
  • findByKey method / How it works...
  • findOne method
    • about / How it works...
  • forkOffChild method / How it works...
  • frequency function / How it works...
  • fully qualified name (FQN) / How it works...
  • functionality
    • adding, to existing Java/Groovy classes / Adding a functionality to the existing Java/Groovy classes, How to do it..., There's more...

G

  • @Grab annotation / How to do it...
    • about / How it works...
  • @GrabExclude annotation / There's more...
  • @GrabResolver annotation / There's more...
  • getContent method
    • about / How it works...
  • getData() method / How it works...
  • getData method
    • about / How it works...
  • getMonthName method / How to do it...
  • getNodeValue() method
    • about / How to do it...
  • getProperties method / There's more...
  • getProperty() method
    • about / How it works...
  • getText() method / How it works...
  • getVarible method / How it works...
  • git clone command / How it works...
  • GitHub
    • URL / Getting ready
  • global transformation
    • about / Adding a caching functionality around methods
  • GMaven / How it works..., There's more...
  • GMaven home page
    • URL / See also
  • GMongo
    • about / Getting ready
  • GPars (Groovy Parallel System) framework
    • about / Introduction
  • GPath
    • used, for searching in XML / Searching in XML with GPath, Getting ready, How to do it...
    • about / Searching in XML with GPath
    • URL / Searching in XML with GPath
  • Gradle
    • URL / Integrating Groovy into the build process using Gradle, See also
    • about / Integrating Groovy into the build process using Gradle
    • used, fof integrating Groovy / Integrating Groovy into the build process using Gradle, How to do it..., There's more...
    • user guide / Getting ready
    • URL, for Groovy plugin documentation / See also
  • Gradle's Groovydoc integration
    • URL / See also
  • Gradle's plugin for CodeNarc
    • URL / See also
  • Grape
    • about / Simplifying dependency management with Grape
    • used, for simplifying dependencies management / Simplifying dependency management with Grape, How to do it..., How it works..., There's more...
  • Grape documentation
    • URL / See also
  • grape install command / There's more...
  • Groovy
    • installing, on Windows / Installing Groovy on Windows, Getting ready, How to do it…
    • installing, on Linux / Installing Groovy on Linux and OS X, How to do it...
    • installing, on OS X / Installing Groovy on Linux and OS X, How to do it...
    • using, as command-line text file editor / Using Groovy as a command-line text file editor, How it works...
    • using, to start server on command line / Using Groovy to start a server on the command line
    • running, with invokedynamic support / Running Groovy with invokedynamic support
    • building, from source / Building Groovy from source, How to do it...
    • multiple installations on Linux, managing / Managing multiple Groovy installations on Linux, Getting ready, How to do it...
    • configuring, in Eclipse / Configuring Groovy in Eclipse, How to do it..., How it works...
    • configuring, in IntelliJ IDEA / Configuring Groovy in IntelliJ IDEA, Getting ready, How to do it...
    • Java classes, using from / Using Java classes from Groovy
    • embedding, into Java / Embedding Groovy into Java, How to do it..., How it works...
    • code, compiling / Compiling Groovy code, Getting ready, How it works...
    • integrating, Ant used / Integrating Groovy into the build process using Ant, Getting ready, How to do it...
    • integrating, Maven used / Integrating Groovy into the build process using Maven, How to do it..., How it works..., There's more...
    • integrating, Gradle used / Integrating Groovy into the build process using Gradle, How to do it..., There's more...
    • code, defining as data / Defining code as data in Groovy, How to do it..., There's more...
    • data structures, defining as code / Defining data structures as code in Groovy, Getting ready, How to do it..., How it works...
    • multiple inheritance, implementing / Implementing multiple inheritance in Groovy, Getting ready, How to do it..., How it works...
    • files, working with / Introduction
    • used, for accessing Redis / Using Groovy to access Redis, Getting ready, How to do it..., How it works..., There's more...
    • used, for accessing MongoDB / Using Groovy to access MongoDB, How to do it..., How it works...
    • used, for accessing Apache Cassandra / Using Groovy to access Apache Cassandra, How to do it..., How it works...
    • web services, working with / Introduction
  • groovy.sql.Sql class
    • about / How it works...
  • Groovy Adaptable (Advanced) Packaging Engine / Getting ready
  • Groovy Ant task documentation
    • URL / See also
  • Groovy Bean
    • JSON message, converting to / Converting JSON message to Groovy Bean, Getting ready, How it works...
  • Groovy Beans
    • used, for writing JavaBeans / Writing less verbose Java Beans with Groovy Beans, How to do it..., How it works...
    • cloning functionality, adding / Adding the cloning functionality to Groovy Beans, How to do it...
    • serializing, to XML / Serializing Groovy Beans to XML, Getting ready, How to do it..., How it works...
  • groovyc command
    • functionalities / Compiling Groovy code
  • Groovy classes
    • constructors, inheriting / Inheriting constructors in Groovy classes
    • functionality, adding / Adding a functionality to the existing Java/Groovy classes
    • automatic logging, adding / Adding automatic logging to Groovy classes, There's more...
    • extending, ExpandoMetaClass used / Dynamically extending classes with new methods, How it works..., There's more...
  • Groovy code
    • executing, from command line / Executing Groovy code from the command line, There's more...
    • documentation, generating for / Generating documentation for Groovy code, Getting ready, How it works..., There's more...
    • quality, checking with CodeNarc / Checking Groovy code's quality with CodeNarc, Getting ready, How to do it...
  • groovy command / How to do it…
  • Groovy Compile Ant task documentation
    • URL / See also
  • GroovyConsole
    • starting, to execute Groovy snippets / Starting groovyConsole to execute Groovy snippets, How to do it...
  • Groovydoc
    • about / There's more...
  • Groovydoc's Ant task
    • URL / See also
  • groovydoc command-line tool
    • features / Generating documentation for Groovy code
  • Groovy Eclipse Compiler plugin documentation
    • URL / See also
  • Groovy GDK / How it works...
  • GroovyInterceptable class / How it works...
  • Groovy language features
    • about / Introduction
  • GroovyScriptEngine class / There's more...
  • groovysh command
    • about / How it works...
  • GroovyShell class / How to do it...
  • groovysh tool
    • used, for Groovy commands / Using groovysh to try out Groovy commands, How to do it...
    • working / How it works...
    • commands / There's more...
    • help / There's more...
    • display command / There's more...
    • record command / There's more...
    • inspect command / There's more...
  • Groovy snippets
    • executing / Starting groovyConsole to execute Groovy snippets, How to do it...
  • GVM
    • about / Managing multiple Groovy installations on Linux
    • using / Getting ready, How to do it...

H

  • HGETALL command / There's more...
  • hmset method / There's more...
  • HSQLDB
    • about / Getting ready
  • HTTPBuilder
    • about / Issuing a REST request and parsing a response
  • HTTP GET request
    • executing / Executing an HTTP GET request, How to do it..., There's more...
  • HTTP POST request
    • executing / Executing an HTTP POST request, How it works..., There's more...
  • Hyper Text Transfer Protocol (HTTP)
    • about / Downloading content from the Internet

I

  • @Immutable annotation
    • about / How it works...
  • @Immutable AST transformation
    • using / How it works...
  • @InheritConstructors annotation
    • features / How to do it...
    • working / How it works...
  • IMDB
    • about / Getting ready
    • URL / Getting ready
  • ImportCustomizer class / Adding transparent imports to a script, There's more...
    • addImport method / There's more...
    • addImports method / There's more...
    • addStaticImport method / There's more...
  • InputStream method
    • about / How it works...
  • IntelliJ IDEA
    • about / Configuring Groovy in IntelliJ IDEA
    • Groovy, configuring / Configuring Groovy in IntelliJ IDEA, Getting ready, How to do it...
    • downloading / Getting ready
  • invokedynamic support
    • Groovy, running with / Running Groovy with invokedynamic support, There's more...
  • invokeMethod() method
    • about / How it works...
    / Adding performance logging to methods
  • isDataStrategy method
    • code / How it works...
  • iText
    • about / Getting ready

J

  • Jaskell / Embedding Groovy into Java
  • java.lang.Math class / How it works...
  • JavaBeans
    • about / Writing less verbose Java Beans with Groovy Beans
    • writing, Groovy Beans used / Writing less verbose Java Beans with Groovy Beans, How to do it..., How it works...
  • Java classes
    • using, from Groovy / Using Java classes from Groovy, How it works...
  • Javadoc's home page
    • URL / See also
  • javadoc tool
    • running / Generating documentation for Groovy code
  • Jedis
    • URL / Getting ready
  • JIT (Just-In-Time) compiler
    • about / Running Groovy with invokedynamic support
  • JRuby / Embedding Groovy into Java
  • JSON
    • URL / Introduction
    • about / Introduction
    • features / Introduction
    • used, for configuring scripts / Using JSON to configure your scripts, How to do it..., How it works...
  • JsonBuilder
    • used, for constructing JSON messages / Constructing JSON messages with JsonBuilder, How to do it..., How it works...
  • JSON messages
    • parsing, JsonSlurper used / Parsing JSON messages with JsonSlurper, How to do it..., How it works...
    • constructing, JsonBuilder used / Constructing JSON messages with JsonBuilder, How to do it..., How it works...
    • modifying / Modifying JSON messages, How it works...
    • validating / Validating JSON messages, Getting ready, How to do it...
    • converting, to XML / Converting JSON message to XML, Getting ready, How it works...
    • converting, to Groovy Bean / Converting JSON message to Groovy Bean, Getting ready, There's more...
  • JSON Schema
    • about / There's more...
  • JsonSlurper
    • used, for parsing JSON messages / Parsing JSON messages with JsonSlurper, How to do it..., How it works...
    • about / There's more...
  • Jython / Embedding Groovy into Java

L

  • leftShift method / How it works..., How it works...
    • about / How to do it...
  • Linux
    • Groovy, installing / Installing Groovy on Linux and OS X
  • listFiles method / How to do it..., There's more...
  • list method / How to do it...
  • local transformation
    • about / Adding a caching functionality around methods
  • LPUSH command / How it works...
  • LRANGE command / How it works...

M

  • @Mixin annotation
    • about / How it works...
  • Maven's plugin for CodeNarc
    • URL / See also
  • Maven Central Repository
    • URL / Getting ready, There's more...
  • Maven home page
    • URL / See also
  • message-based concurrency
    • building, actors used / Using actors to build message-based concurrency, How to do it..., How it works...
  • MessageReceiver server class
    • about / Getting ready
  • MessageSender client class
    • about / Getting ready
  • Meta Object Protocol (MOP)
    • about / How it works...
  • methodMissing method
    • about / How to do it..., How it works...
    • code / How it works...
  • methods
    • querying / Querying methods and properties, How to do it..., How it works...
    • overriding dynamically / Overriding methods dynamically, Getting ready, How it works...
    • performance logging, adding / Adding performance logging to methods, How to do it..., How it works...
    • caching functionality, adding / Adding a caching functionality around methods, Getting ready, How to do it..., How it works...
  • MongoDB
    • about / Using Groovy to access MongoDB
    • URL / Using Groovy to access MongoDB
    • festures / Using Groovy to access MongoDB
    • accessing, Groovy used / Using Groovy to access MongoDB, Getting ready, How to do it...
    • installation / Getting ready
  • MongoDB Java driver
    • about / Getting ready
  • MOP
    • about / Dynamically extending classes with new methods
  • MULTI command
    • working / There's more...
  • multiple inheritance
    • implementing, in Groovy / Implementing multiple inheritance in Groovy, Getting ready, How to do it..., How it works...
  • MVEL
    • URL / Embedding Groovy into Java

N

  • newInputStream method / There's more...
  • newInstance method / There's more...
  • newReader method / There's more...
  • NLP (Natural Language Processing) library / How it works...

O

  • ==~ operator / How to do it...
  • OAuth protocol
    • about / Using OAuth for web service security
    • using, for web service security / Using OAuth for web service security, Getting ready, How to do it..., How it works...
  • onMessage function / How it works...
  • openConnection method
    • about / How to do it..., How it works...
  • OS X
    • Groovy, installing / Installing Groovy on Linux and OS X

P

  • (Plain Old Java Objects (POJOs) / Searching in XML with GPath
  • parseClass method / There's more...
  • parseText() method
    • about / How it works...
  • partition function / How it works...
  • PDF file
    • data, extracting from / Extracting data from a PDF, Getting ready, How to do it..., How it works..., There's more...
  • performance logging
    • adding, to methods / Adding performance logging to methods, Getting ready, How to do it..., How it works..., There's more...
  • Plain Old Groovy Objects (POGOs) / Searching in XML with GPath
  • Plain Old Java Objects (POJOs) / Searching in XML with GPath
  • PMD (Project Mess Detector)
    • URL / Checking Groovy code's quality with CodeNarc
  • poem.txt file
    • exploring / How to do it...
  • POM (Project Object Model)
    • about / Integrating Groovy into the build process using Maven
  • populate method
    • about / Getting ready
  • println method / How it works...
  • properties
    • querying / Querying methods and properties, How to do it..., How it works...

R

  • Ratpack
    • about / Getting ready
  • readLines() method / How to do it...
  • Redis
    • about / Using Groovy to access Redis
    • features / Using Groovy to access Redis, There's more...
    • accessing, Groovy used / Using Groovy to access Redis, Getting ready
    • URL / Getting ready
    • download page / Getting ready
  • regular expressions
    • about / Searching strings with regular expressions
    • used, for searching strings / Searching strings with regular expressions, How to do it...
  • remote SSH commands
    • executing, DSL used / DSL for executing commands over SSH
  • REPL
    • about / Using groovysh to try out Groovy commands
  • reports
    • generating from log files, DSL used / DSL for generating reports from logfiles
  • responseCode
    • about / How it works...
  • REST request
    • issuing / Issuing a REST request and parsing a response, How to do it..., How it works...
    • parsing / Issuing a REST request and parsing a response, How to do it..., How it works...
  • RPOP command / How it works...
  • RPUSH command / How it works...
  • RSS feeds
    • consuming / Consuming RSS and Atom feeds, How to do it..., There's more...
  • runForkJoin method / How it works...

S

  • scripts
    • configuring, JSON used / Using JSON to configure your scripts, Getting ready
    • transparent imports, adding / Adding transparent imports to a script, How to do it..., How it works...
  • setText method / How it works...
  • setVariable method / How it works...
  • simple ORM framework
    • building / Building a simple ORM framework, Getting ready, How it works..., There's more...
  • Sinatra
    • about / Getting ready
  • SOAP
    • about / Issuing a SOAP request and parsing a response
  • SOAP-over-HTTP protocol binding
    • about / Issuing a SOAP request and parsing a response
  • SOAP-over-JMS protocol binding
    • about / Issuing a SOAP request and parsing a response
  • SOAP-over-SMTP protocol binding
    • about / Issuing a SOAP request and parsing a response
  • SOAP request
    • issuing / Issuing a SOAP request and parsing a response, How to do it..., How it works...
    • parsing / Issuing a SOAP request and parsing a response, How to do it..., How it works...
  • SpEL
    • about / Embedding Groovy into Java
    • URL / Embedding Groovy into Java
  • SQL database
    • connecting to / Connecting to an SQL database, How to do it..., How it works...
    • querying / Querying an SQL database, How to do it...
    • data, modifying / Modifying data in an SQL database, How to do it..., How it works...
    • stored procedure, implementing / Calling a stored procedure, How it works...
    • BLOB/CLOB, reading / Reading BLOB/CLOB from a database
  • static type-checking
    • about / How it works...
  • STM
    • about / Using STM to atomically update fields, There's more...
    • used, for updating fields / Using STM to atomically update fields, How to do it..., How it works..., There's more...
  • stored procedure
    • about / Calling a stored procedure
    • implementing / Calling a stored procedure, How to do it..., There's more...
  • strategyData variable
    • code / How it works...
  • strings
    • searching, regular expressions used / Searching strings with regular expressions, How to do it...

T

  • @ToString annotation
    • about / There's more...
  • @TupleConstructor annotation
    • about / There's more...
  • @TypeChecked annotation / How to do it...
    • working / How it works...
  • taskdef declaration / There's more...
  • tasks
    • splitting, into parallel jobs / Splitting a large task into smaller parallel jobs, How to do it..., How it works...
    • running, in parallel / Running tasks in parallel and asynchronously, Getting ready, How to do it..., How it works...
    • running asynchronously / Running tasks in parallel and asynchronously, Getting ready, How to do it..., How it works...
  • text() method / How it works...
  • text file
    • reading, line by line / Reading a text file line by line, There's more...
    • word-based analysis, making / Processing every word in a text file, How to do it..., There's more...
    • tabs, replacing with spaces / Replacing tabs with spaces in a text file, How to do it..., There's more...
    • content, filtering / Filtering a text file's content, How to do it..., There's more...
  • TimePrinter class / There's more...
  • tokenize method / How it works...
  • toString() method / How it works...
  • toString method
    • about / There's more...
  • transformChar method / There's more...
  • transformLine method / How to do it...
  • transparent imports
    • adding, to script / Adding transparent imports to a script, How to do it...
  • traverse method
    • about / How to do it...
    • options / There's more...
  • type checking rules
    • defining, for dynamic mode / Defining type-checking rules for dynamic code, Getting ready, How to do it..., There's more...

U

  • Universal Resource Identifier (URI)
    • about / Constructing and modifying complex URLs
  • Universal Resource Locator (URL)
    • about / Constructing and modifying complex URLs
  • UnnecessaryGetter violation / How it works...
  • UnnecessaryGString violation / How it works...
  • UnnecessaryPublicModifier violation / How it works...
  • UnnecessarySemicolon violation / How it works...
  • upperInteger function / How to do it...

W

  • waitUntilDone method / How it works...
  • Web Service Definition Language (WSDL)
    • about / Issuing a SOAP request and parsing a response
  • web service security
    • basic authentication, using / Using basic authentication for web service security
    • OAuth protocol, using / Using OAuth for web service security, Getting ready, How to do it..., How it works...
  • Windows
    • Groovy, installing / Installing Groovy on Windows, Getting ready, How to do it…
    • file attributes, changing / Changing file attributes on Windows, How to do it..., How it works...
  • withBatch method
    • about / There's more...
  • withInputStream method
    • about / How it works...
  • withOutputStream method / How it works...
  • withPool method / How it works...
  • withReader() method / How it works...
  • withTransaction method
    • about / There's more...
  • withWriterAppend method / How it works...
  • withWriter method / How it works...
  • word-based analysis, of text file
    • creating / Processing every word in a text file

X

  • XML
    • reading, XmlSlurper used / Reading XML using XmlSlurper, How to do it...
    • reading, XmlParser used / Reading XML using XmlParser, How it works...
    • searching, GPath used / Searching in XML with GPath, Getting ready, How to do it...
    • searching, XPath used / Searching in XML with XPath, Getting ready, How to do it...
    • Groovy Beans, serializing to / Serializing Groovy Beans to XML, How to do it...
    • JSON message, converting to / Converting JSON message to XML
  • XML content
    • reading, with namespaces / Reading XML content with namespaces, How it works...
    • constructing / Constructing XML content, How to do it..., How it works...
    • modifying / Modifying XML content, How to do it..., How it works...
  • XML namespace
    • about / Reading XML content with namespaces
  • XmlNodePrinter class
    • about / How it works...
  • XML nodes
    • sorting / Sorting XML nodes, How it works..., There's more...
  • XmlParser
    • used, for reading XML / Reading XML using XmlParser, How it works...
  • XML Schema Definition (XSD)
    • about / Issuing a SOAP request and parsing a response
  • XmlSlurper
    • used, for reading XML / Reading XML using XmlSlurper, How to do it...
    • about / How it works...
  • XPath
    • about / Searching in XML with XPath
    • used, for searching in XML / Searching in XML with XPath, Getting ready, How to do it...
  • XStream
    • about / Getting ready
    • URL / Getting ready
    • working / How it works...
    • class aliasing / There's more...
    • field aliasing / There's more...
    • attribute aliasing / There's more...
    • URL, for documentation / See also

Y

  • YAML
    • about / There's more...

Z

  • ZIP file
    • data, reading from / Reading data from a ZIP file, How to do it...
lock icon The rest of the chapter is locked
arrow left Previous Section
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image