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 |
---|
ReflectorLoader
(ClassLoader parent) creates a ReflectorLoader. |
Type | Name and description |
---|---|
Class |
defineClass(String name, byte[] bytecode, ProtectionDomain domain) helper method to define Reflector classes. |
protected Class |
findClass(String name) Tries to find a Groovy class. |
Class |
getLoadedClass(String name) try to load one of the defined Reflector classes by name. |
protected Class |
loadClass(String name, boolean resolve) Loads a class per name. |
Methods inherited from class | Name |
---|---|
class ClassLoader |
loadClass, getSystemClassLoader, getResource, getResourceAsStream, getSystemResource, getSystemResourceAsStream, clearAssertionStatus, getParent, getResources, getSystemResources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
class Object |
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
creates a ReflectorLoader.
parent
- the parent loader. This should never be null!helper method to define Reflector classes.
name
- of the Reflectorbytecode
- the bytecodedomain
- the protection domainTries to find a Groovy class.
try to load one of the defined Reflector classes by name.
name
- of the Reflector classLoads a class per name. Unlike a normal loadClass this version behaves different during a class definition. In that case it checks if the class we want to load is Reflector and returns class if the check is successful. If it is not during a class definition it just calls the super class version of loadClass.
name
- of the class to loadresolve
- is true if the class should be resolvedCopyright © 2003-2015 The Apache Software Foundation. All rights reserved.