Package elki.application.internal
Class CheckParameterizables
- java.lang.Object
-
- elki.application.internal.CheckParameterizables
-
public class CheckParameterizables extends java.lang.Object
Perform some consistency checks on classes that cannot be specified as Java interface.- Since:
- 0.3
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
CheckParameterizables.State
Current verification state.
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<java.lang.Class<?>>
knownParameterizables
Known parameterizable classes/interfaces.private static Logging
LOG
The logger for this class.
-
Constructor Summary
Constructors Constructor Description CheckParameterizables()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private CheckParameterizables.State
checkDefaultConstructor(java.lang.Class<?> cls, CheckParameterizables.State state)
Check for a default constructor.void
checkParameterizables()
Validate all "Parameterizable" objects for parts of the API contract that cannot be specified in Java interfaces (such as constructors, static methods)private boolean
checkParameterizer(java.lang.Class<?> cls, java.lang.Class<? extends Parameterizer> par)
private boolean
checkSupertypes(java.lang.Class<?> cls)
Check all supertypes of a class.private CheckParameterizables.State
checkV3Parameterization(java.lang.Class<?> cls, CheckParameterizables.State state)
Check for a V3 constructor.static void
main(java.lang.String[] args)
-
-
-
Field Detail
-
LOG
private static final Logging LOG
The logger for this class.
-
knownParameterizables
private java.util.List<java.lang.Class<?>> knownParameterizables
Known parameterizable classes/interfaces.
-
-
Method Detail
-
checkParameterizables
public void checkParameterizables()
Validate all "Parameterizable" objects for parts of the API contract that cannot be specified in Java interfaces (such as constructors, static methods)
-
checkSupertypes
private boolean checkSupertypes(java.lang.Class<?> cls)
Check all supertypes of a class.- Parameters:
cls
- Class to check.- Returns:
true
when at least one supertype is a known parameterizable type.
-
checkV3Parameterization
private CheckParameterizables.State checkV3Parameterization(java.lang.Class<?> cls, CheckParameterizables.State state) throws java.lang.NoClassDefFoundError
Check for a V3 constructor.- Throws:
java.lang.NoClassDefFoundError
-
checkDefaultConstructor
private CheckParameterizables.State checkDefaultConstructor(java.lang.Class<?> cls, CheckParameterizables.State state) throws java.lang.NoClassDefFoundError
Check for a default constructor.- Throws:
java.lang.NoClassDefFoundError
-
checkParameterizer
private boolean checkParameterizer(java.lang.Class<?> cls, java.lang.Class<? extends Parameterizer> par)
-
main
public static void main(java.lang.String[] args)
- Parameters:
args
- Command line arguments
-
-