Package de.gebit.integrity.classloading
Class DefaultIntegrityClassLoader
- java.lang.Object
-
- de.gebit.integrity.classloading.DefaultIntegrityClassLoader
-
- All Implemented Interfaces:
IntegrityClassLoader
public class DefaultIntegrityClassLoader extends Object implements IntegrityClassLoader
Basic implementation ofIntegrityClassLoader. Uses the injected Java classloader internally.- Author:
- Rene Schneider - initial API and implementation
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassLoaderclassLoaderThe actual classloader used internally.protected ModelSourceExplorermodelSourceExplorerThe model source explorer.
-
Constructor Summary
Constructors Constructor Description DefaultIntegrityClassLoader()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<?>loadClass(JavaClassReference aClassReference)Load the class defined by the providedJavaClassReference.Class<?>loadClass(JavaConstantReference aConstantReference)Load the class defined by the providedJavaConstantReference.Class<?>loadClass(MethodReference aMethodReference)Load the class defined by the providedMethodReference.Class<?>loadClass(OperationDefinition anOperationDefinition)Load the class defined by the providedOperationDefinition.Class<?>loadClass(String aClassName)Loads the class given by the fully-qualified name.Class<?>loadClass(org.eclipse.xtext.common.types.JvmType aType)Load the class defined by the providedJvmType.MethodloadMethod(MethodReference aMethodReference)First loads the class defined by the providedMethodReference, then loads the method.
-
-
-
Field Detail
-
classLoader
@Inject protected ClassLoader classLoader
The actual classloader used internally.
-
modelSourceExplorer
@Inject protected ModelSourceExplorer modelSourceExplorer
The model source explorer.
-
-
Method Detail
-
loadClass
public Class<?> loadClass(org.eclipse.xtext.common.types.JvmType aType) throws ClassNotFoundException
Description copied from interface:IntegrityClassLoaderLoad the class defined by the providedJvmType.- Specified by:
loadClassin interfaceIntegrityClassLoader- Parameters:
aType- the type referring to the class- Returns:
- the loaded class
- Throws:
ClassNotFoundException
-
loadClass
public Class<?> loadClass(String aClassName) throws ClassNotFoundException
Description copied from interface:IntegrityClassLoaderLoads the class given by the fully-qualified name.- Specified by:
loadClassin interfaceIntegrityClassLoader- Parameters:
aClassName- the class to load- Returns:
- the loaded class
- Throws:
ClassNotFoundException
-
loadClass
public Class<?> loadClass(OperationDefinition anOperationDefinition) throws ClassNotFoundException
Description copied from interface:IntegrityClassLoaderLoad the class defined by the providedOperationDefinition.- Specified by:
loadClassin interfaceIntegrityClassLoader- Parameters:
anOperationDefinition- the operation definition referring to the class- Returns:
- the loaded class
- Throws:
ClassNotFoundException
-
loadClass
public Class<?> loadClass(MethodReference aMethodReference) throws ClassNotFoundException
Description copied from interface:IntegrityClassLoaderLoad the class defined by the providedMethodReference.- Specified by:
loadClassin interfaceIntegrityClassLoader- Parameters:
aMethodReference- the method reference referring to the class- Returns:
- the loaded class
- Throws:
ClassNotFoundException
-
loadClass
public Class<?> loadClass(JavaConstantReference aConstantReference) throws ClassNotFoundException
Description copied from interface:IntegrityClassLoaderLoad the class defined by the providedJavaConstantReference.- Specified by:
loadClassin interfaceIntegrityClassLoader- Parameters:
aConstantReference- the constant reference referring to the class- Returns:
- the loaded class
- Throws:
ClassNotFoundException
-
loadClass
public Class<?> loadClass(JavaClassReference aClassReference) throws ClassNotFoundException
Description copied from interface:IntegrityClassLoaderLoad the class defined by the providedJavaClassReference.- Specified by:
loadClassin interfaceIntegrityClassLoader- Parameters:
aClassReference- the class reference referring to the class- Returns:
- the loaded class
- Throws:
ClassNotFoundException
-
loadMethod
public Method loadMethod(MethodReference aMethodReference) throws ClassNotFoundException, MethodNotFoundException
Description copied from interface:IntegrityClassLoaderFirst loads the class defined by the providedMethodReference, then loads the method.- Specified by:
loadMethodin interfaceIntegrityClassLoader- Parameters:
aMethodReference- the method reference referring to class and method- Returns:
- the loaded method
- Throws:
ClassNotFoundExceptionMethodNotFoundException
-
-