Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
GroovyCodeSource
(String script, String name, String codeBase) |
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). |
GroovyCodeSource
(File infile, String encoding) |
GroovyCodeSource
(File infile) @param infile the file to create a GroovyCodeSource for. |
GroovyCodeSource
(URI uri) |
GroovyCodeSource
(URL url) |
Type | Name and description |
---|---|
File |
getFile() |
String |
getName() |
String |
getScriptText() |
URL |
getURL() |
boolean |
isCachable() |
void |
setCachable(boolean b) |
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.
infile
- the file to create a GroovyCodeSource for.Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.