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 |
---|
CompileUnit
(GroovyClassLoader classLoader, CompilerConfiguration config) |
CompileUnit
(GroovyClassLoader classLoader, CodeSource codeSource, CompilerConfiguration config) |
Type | Name and description |
---|---|
void |
addClass(ClassNode node) Adds a class to the unit. |
void |
addClassNodeToCompile(ClassNode node, SourceUnit location) this method actually does not compile a class. |
void |
addGeneratedInnerClass(InnerClassNode icn) |
void |
addModule(ModuleNode node) |
ClassNode |
getClass(String name) @return the ClassNode for the given qualified name or returns null if the name does not exist in the current compilation unit (ignoring the .class files on the classpath) |
GroovyClassLoader |
getClassLoader() |
List |
getClasses() @return a list of all the classes in each module in the compilation unit |
CodeSource |
getCodeSource() |
CompilerConfiguration |
getConfig() |
InnerClassNode |
getGeneratedInnerClass(String name) |
Map<String, InnerClassNode> |
getGeneratedInnerClasses() |
List<ModuleNode> |
getModules() |
SourceUnit |
getScriptSourceLocation(String className) |
boolean |
hasClassNodeToCompile() |
Iterator<String> |
iterateClassNodeToCompile() |
Adds a class to the unit.
this method actually does not compile a class. It's only a marker that this type has to be compiled by the CompilationUnit at the end of a parse step no node should be be left.
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.