-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathInputSourceBuilder.java
executable file
·93 lines (85 loc) · 2.32 KB
/
InputSourceBuilder.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package samples;
import java.io.InputStream;
import javaxfake.annotation.Generated;
import net.karneim.pojobuilder.GwtIncompatible;
import org.xml.sax.InputSource;
@Generated("PojoBuilder")
public class InputSourceBuilder
implements Cloneable {
protected InputSourceBuilder self;
protected InputStream value$byteStream$java$io$InputStream;
protected boolean isSet$byteStream$java$io$InputStream;
protected String value$encoding$java$lang$String;
protected boolean isSet$encoding$java$lang$String;
/**
* Creates a new {@link InputSourceBuilder}.
*/
public InputSourceBuilder() {
self = (InputSourceBuilder)this;
}
/**
* Sets the default value for the byteStream property.
*
* @param value the default value
* @return this builder
*/
public InputSourceBuilder withByteStream(InputStream value) {
this.value$byteStream$java$io$InputStream = value;
this.isSet$byteStream$java$io$InputStream = true;
return self;
}
/**
* Sets the default value for the encoding property.
*
* @param value the default value
* @return this builder
*/
public InputSourceBuilder withEncoding(String value) {
this.value$encoding$java$lang$String = value;
this.isSet$encoding$java$lang$String = true;
return self;
}
/**
* Returns a clone of this builder.
*
* @return the clone
*/
@Override
@GwtIncompatible
public Object clone() {
try {
InputSourceBuilder result = (InputSourceBuilder)super.clone();
result.self = result;
return result;
} catch (CloneNotSupportedException e) {
throw new InternalError(e.getMessage());
}
}
/**
* Returns a clone of this builder.
*
* @return the clone
*/
@GwtIncompatible
public InputSourceBuilder but() {
return (InputSourceBuilder)clone();
}
/**
* Creates a new {@link InputSource} based on this builder's settings.
*
* @return the created InputSource
*/
public InputSource build() {
try {
InputSource result = InputSourceFactory.createInputSource(value$byteStream$java$io$InputStream);
if (isSet$encoding$java$lang$String) {
result.setEncoding(value$encoding$java$lang$String);
}
return result;
} catch (RuntimeException ex) {
throw ex;
} catch (Exception ex) {
throw new RuntimeException(ex);
}
}
}