Groovy Documentation

org.gradle.tooling
[Java] Interface ModelBuilder

org.gradle.tooling.ModelBuilder
  org.gradle.tooling.LongRunningOperation
All Superinterfaces:
LongRunningOperation

public interface ModelBuilder
extends LongRunningOperation

A ModelBuilder allows you to fetch a snapshot of the model for a project.

You use a ModelBuilder as follows:

Instances of ModelBuilder are not thread-safe.

Parameters:
- The type of model to build


Method Summary
ModelBuilder addProgressListener(ProgressListener listener)

{@inheritDoc}

java.lang.Object get()

Fetch the model, blocking until it is available.

void get(ResultHandler handler)

Starts fetching the build.

ModelBuilder setStandardError(java.io.OutputStream outputStream)

{@inheritDoc}

ModelBuilder setStandardInput(java.io.InputStream inputStream)

{@inheritDoc}

ModelBuilder setStandardOutput(java.io.OutputStream outputStream)

{@inheritDoc}

 
Methods inherited from interface LongRunningOperation
addProgressListener, setStandardError, setStandardInput, setStandardOutput
 

Method Detail

addProgressListener

public ModelBuilder addProgressListener(ProgressListener listener)
{@inheritDoc}


get

public java.lang.Object get()
Fetch the model, blocking until it is available.
throws:
UnsupportedVersionException When the target Gradle version does not support the features required to build this model.
throws:
BuildException On some failure executing the Gradle build.
throws:
GradleConnectionException On some other failure using the connection.
throws:
IllegalStateException When the connection has been closed or is closing.
Returns:
The model.


get

public void get(ResultHandler handler)
Starts fetching the build. This method returns immediately, and the result is later passed to the given handler.
throws:
IllegalStateException When the connection has been closed or is closing.
Parameters:
handler - The handler to supply the result to.


setStandardError

public ModelBuilder setStandardError(java.io.OutputStream outputStream)
{@inheritDoc}


setStandardInput

public ModelBuilder setStandardInput(java.io.InputStream inputStream)
{@inheritDoc}


setStandardOutput

public ModelBuilder setStandardOutput(java.io.OutputStream outputStream)
{@inheritDoc}


 

Groovy Documentation