| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| pack-priv Certificate[] | certs
The certificates used to sign the items from the codesource |
| private CodeSource | codeSource
The codeSource to be given the generated class. |
| private File | |
| private String | name
The name given to the generated class |
| private String | scriptText
The groovy source to be compiled and turned into a class |
| private URL |
| Access | Constructor and Description |
|---|---|
| public | |
| public | GroovyCodeSource(Reader reader, String name, String codeBase)
Construct a GroovyCodeSource for an inputStream of groovyCode that has an unknown provenance -- meaning it didn't come from a File or a URL (e.g. a String). |
| public | |
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static CodeSource | |
| public boolean | equals(Object
the reference object with which to compare. o)Overrides java. |
| public CodeSource | |
| private static String | getContentEncoding(URL url)
TODO(jwagenleitner): remove or fix in future release According to the spec getContentEncoding() returns the Content-Encoding HTTP Header which typically carries values such as 'gzip' or 'deflate' and is not the character set encoding. |
| public File | |
| public String | |
| public String | |
| public URL | |
| public int | |
| public boolean | |
| public void |
| cachable | back to summary |
|---|---|
| private boolean cachable | |
| certs | back to summary |
|---|---|
| pack-priv Certificate[] certs The certificates used to sign the items from the codesource | |
| codeSource | back to summary |
|---|---|
| private CodeSource codeSource The codeSource to be given the generated class. This can be used by policy file grants to administer security. | |
| file | back to summary |
|---|---|
| private File file | |
| name | back to summary |
|---|---|
| private String name The name given to the generated class | |
| scriptText | back to summary |
|---|---|
| private String scriptText The groovy source to be compiled and turned into a class | |
| url | back to summary |
|---|---|
| private URL url | |
| GroovyCodeSource | back to summary |
|---|---|
| public GroovyCodeSource(String script, String name, String codeBase) | |
| GroovyCodeSource | back to summary |
|---|---|
| public GroovyCodeSource(Reader reader, String name, String codeBase) Construct a GroovyCodeSource for an inputStream of groovyCode that has an unknown provenance -- meaning it didn't come from a File or a URL (e.g. a String). The supplied codeBase will be used to construct a File URL that should match up with a java Policy entry that determines the grants to be associated with the class that will be built from the InputStream. The permission groovy.security.GroovyCodeSourcePermission will be used to determine if the given codeBase may be specified. That is, the current Policy set must have a GroovyCodeSourcePermission that implies the codeBase, or an exception will be thrown. This is to prevent callers from hijacking existing codeBase policy entries unless explicitly authorized by the user. | |
| GroovyCodeSource | back to summary |
|---|---|
| public GroovyCodeSource(final File infile, final String encoding) throws IOException | |
| GroovyCodeSource | back to summary |
|---|---|
public GroovyCodeSource(final File infile) throws IOException
| |
| GroovyCodeSource | back to summary |
|---|---|
| public GroovyCodeSource(URI uri) throws IOException | |
| GroovyCodeSource | back to summary |
|---|---|
| public GroovyCodeSource(URL url) | |
| createCodeSource | back to summary |
|---|---|
| private static CodeSource createCodeSource(final String codeBase) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getCodeSource | back to summary |
|---|---|
| public CodeSource getCodeSource() | |
| getContentEncoding | back to summary |
|---|---|
| private static String getContentEncoding(URL url) throws IOException TODO(jwagenleitner): remove or fix in future release According to the spec getContentEncoding() returns the Content-Encoding HTTP Header which typically carries values such as 'gzip' or 'deflate' and is not the character set encoding. For compatibility in 2.4.x, this behavior is retained but should be removed or fixed (parse charset from Content-Type header) in future releases. see GROOVY-8056 and https://github.com/apache/groovy/pull/500 | |
| getFile | back to summary |
|---|---|
| public File getFile() | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getScriptText | back to summary |
|---|---|
| public String getScriptText() | |
| getURL | back to summary |
|---|---|
| public URL getURL() | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isCachable | back to summary |
|---|---|
| public boolean isCachable() | |
| setCachable | back to summary |
|---|---|
| public void setCachable(boolean b) | |