|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectit.avutils.jmapper.config.Error
public final class Error
This Class exposes all common methods to handle technical errors.
The scope is to centralize the management of exceptions
and make the code more readable.
The constants used are the keys of the "jmapper.msg.properties" file present in this package.
| Constructor Summary | |
|---|---|
Error()
|
|
| Method Summary | |
|---|---|
static void |
absentRelationship(Class<?> configuredClass,
Class<?> targetClass)
Thrown when there isn't correspondence between classes. |
static void |
attributeAbsent(Class<?> aClass,
Attribute aField)
Thrown if the attribute doesn't exist in aClass. |
static void |
attributeInexistent(String attributeName,
Class<?> aClass)
Thrown if attributes isn't present in the xml file. |
static void |
bodyContainsIllegalCode(Method method,
Exception additionalInformation)
Thrown when the code contained in the body method is illegal. |
static void |
classesAbsent(String fieldName,
Class<?> aClass)
Thrown if the configured field hasn't classes parameter. |
static void |
classesNotConfigured(Class<?> destination,
Class<?> source)
Thrown when the xml configuration doesn't exist. |
static void |
classInexistent(String aClass)
Thrown if class is present in the xml configuration file but doesn't exist. |
static void |
classNotConfigured(Class<?> clazz)
Thrown when the xml configuration of the clazz doesn't exist. |
static void |
classNotMapped(Class<?> aClass)
Thrown if the class isn't mapped. |
static void |
classNotMapped(Object sourceClass,
Class<?> configuredClass)
Thrown if the sourceClass isn't mapped in configuredClass. |
static void |
configNotPresent(Class<?> destination,
Class<?> source,
XML xml)
Thrown when the xml configuration doesn't contains the classes configuration. |
static void |
configNotPresent(Class<?> clazz,
XML xml)
Thrown when missing the configuration belonging to clazz. |
static void |
emptyConstructorAbsent(Class<?> aClass)
Thrown if the class haven't an empty constructor. |
static void |
fileNotFound()
Thrown when the file isn't found. |
static void |
fileNotFound(String path)
Thrown when the file isn't found. |
static void |
illegalCode(Class<?> destination,
Class<?> source,
String path,
Throwable e)
Thrown when there is an error in mapper generated class. |
static void |
illegalCode(Class<?> destination,
Class<?> source,
Throwable e)
Thrown when there is an error in mapper generated class. |
static void |
illegalCode(Exception e,
String methodName,
String className)
Thrown when the explicit conversion method defined has a null pointer. |
static void |
illegalCode(Exception e,
String methodName,
String className,
String path)
Thrown when the explicit conversion method defined has a null pointer. |
static void |
improperUseOfTheParameter(String conversionName,
String xmlPath,
String className)
Thrown if the use of the parameters is incorrect. |
static void |
incorrectBodyDefinition(String methodName,
String className)
Thrown when the body method don't respects the convetions beloging to the dynamic conversion implementation. |
static void |
incorrectMethodDefinition(String methodName,
String className)
Thrown when the method don't respects the convetions beloging to the dynamic conversion implementation. |
static void |
interfaceClass(String className)
Thrown if the class is an interface. |
static void |
mapping(String mappedFieldName,
Class<?> mappedClass,
Class<?> targetClass)
Thrown when there is an error in the configuration. |
static void |
mapping(String mappedFieldName,
String mappedClassName)
Thrown when the length of classes and attribute parameter isn't the same. |
static void |
mapping(String mappedFieldName,
String mappedClassName,
String targetClassName)
Thrown when the target class doesn't exist in classes parameter. |
static void |
mapping(String mappedFieldName,
String mappedClassName,
String targetFieldName,
String targetClassName)
Thrown when the target field doesn't exist. |
static void |
method(String methodName,
String fieldName,
Class<?> clazz)
Thrown when the bean doesn't respect the javabean conventions. |
static void |
notFoundException(Exception e)
Thrown when javassist don't find classes. |
static void |
nullMappedClass(String className)
Thrown if the class is null. |
static void |
parametersUsageNotAllowed(String methodName,
String className)
Thrown when the parameters number is incorrect. |
static void |
unableLoadingFile()
Thrown when the file can't be loaded. |
static void |
undefinedMapping(Field destinationField,
Class<?> destinationClass,
Field sourceField,
Class<?> sourceClass)
Thrown when the instruction isn't defined. |
static void |
wrongParameterNumber(String methodName,
String className)
Thrown when the parameters number is incorrect. |
static void |
xmlAttributeExistent(String path,
Attribute attribute,
Class<?> aClass)
Thrown if attribute is present in the xml file. |
static void |
xmlAttributeInexistent(String path,
String attributeName,
Class<?> aClass)
Thrown if attribute is present in the xml file. |
static void |
xmlClassExistent(String path,
Class<?> aClass)
Thrown if class is present in xml file. |
static void |
xmlClassInexistent(String path,
Class<?> aClass)
Thrown if class isn't present in xml file. |
static void |
xmlConversionNameUndefined(String xmlPath,
String className)
Thrown when the conversion name is undefined. |
static void |
xmlConversionTypeIncorrect(String conversionName,
String xmlPath,
String className,
String type)
Thrown if conversion type is wrong. |
static void |
xmlWrongMethod(Class<?> aClass)
Thrown when the class has only one attribute. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Error()
| Method Detail |
|---|
public static void illegalCode(Exception e,
String methodName,
String className)
className - class name
public static void illegalCode(Exception e,
String methodName,
String className,
String path)
className - class namepath - xml path file
public static void bodyContainsIllegalCode(Method method,
Exception additionalInformation)
method - method to adjustadditionalInformation - additional information relative to the javassist exceptionpublic static void notFoundException(Exception e)
e - exception to handle
public static void wrongParameterNumber(String methodName,
String className)
methodName - method nameclassName - class name
public static void parametersUsageNotAllowed(String methodName,
String className)
methodName - method nameclassName - class name
public static void incorrectMethodDefinition(String methodName,
String className)
methodName - method nameclassName - class name
public static void incorrectBodyDefinition(String methodName,
String className)
methodName - method nameclassName - class namepublic static void classInexistent(String aClass)
aClass - Class analyzed
public static void attributeInexistent(String attributeName,
Class<?> aClass)
attributeName - attribute nameaClass - class analyzedpublic static void xmlWrongMethod(Class<?> aClass)
aClass - class analyzed
public static void xmlAttributeInexistent(String path,
String attributeName,
Class<?> aClass)
path - xml pathattributeName - attribute presentaClass - attribute's class
public static void xmlAttributeExistent(String path,
Attribute attribute,
Class<?> aClass)
path - xml pathattribute - attribute presentaClass - attribute's class
public static void xmlClassInexistent(String path,
Class<?> aClass)
path - xml pathaClass - Class analyzed
public static void xmlClassExistent(String path,
Class<?> aClass)
aClass - Class analyzed
public static void xmlConversionNameUndefined(String xmlPath,
String className)
xmlPath - xml pathclassName - class name
public static void xmlConversionTypeIncorrect(String conversionName,
String xmlPath,
String className,
String type)
conversionName - conversion namexmlPath - xml pathclassName - class nametype - type
public static void improperUseOfTheParameter(String conversionName,
String xmlPath,
String className)
conversionName - conversion namexmlPath - xml pathclassName - class name
public static void unableLoadingFile()
throws LoadingFileException
LoadingFileException
public static void fileNotFound()
throws FileNotFoundException
FileNotFoundException
public static void fileNotFound(String path)
throws FileNotFoundException
FileNotFoundException
public static void undefinedMapping(Field destinationField,
Class<?> destinationClass,
Field sourceField,
Class<?> sourceClass)
destinationField - destination fielddestinationClass - destination classsourceField - source fieldsourceClass - source class
public static void method(String methodName,
String fieldName,
Class<?> clazz)
methodName - name of the method doesn't existfieldName - name of the field analyzeclazz - class when this method isn't present
public static void mapping(String mappedFieldName,
Class<?> mappedClass,
Class<?> targetClass)
mappedFieldName - name of the mapped fieldmappedClass - mapped field's classtargetClass - target field's class
public static void mapping(String mappedFieldName,
String mappedClassName)
mappedFieldName - name of the mapped fieldmappedClassName - name of the mapped field's class
public static void mapping(String mappedFieldName,
String mappedClassName,
String targetClassName)
mappedFieldName - name of the mapped fieldmappedClassName - name of the mapped field's classtargetClassName - name of the target field's class
public static void mapping(String mappedFieldName,
String mappedClassName,
String targetFieldName,
String targetClassName)
mappedFieldName - name of the mapped fieldmappedClassName - name of the mapped field's classtargetFieldName - name of the target fieldtargetClassName - name of the target field's class
public static void attributeAbsent(Class<?> aClass,
Attribute aField)
aClass - class that not contains aFieldaField - the missing field
public static void configNotPresent(Class<?> destination,
Class<?> source,
XML xml)
destination - destination class namesource - source class namexml - xml path
public static void configNotPresent(Class<?> clazz,
XML xml)
clazz - class without configurationxml - xml path
public static void classesNotConfigured(Class<?> destination,
Class<?> source)
destination - destination class namesource - source class namepublic static void classNotConfigured(Class<?> clazz)
clazz - class to check
public static void classesAbsent(String fieldName,
Class<?> aClass)
fieldName - name of the fieldaClass - class's fieldpublic static void classNotMapped(Class<?> aClass)
aClass - class to analyze
public static void classNotMapped(Object sourceClass,
Class<?> configuredClass)
sourceClass - class absentconfiguredClass - class that not contains sourceClass
public static void illegalCode(Class<?> destination,
Class<?> source,
String path,
Throwable e)
destination - destination classsource - source classpath - xml path configuratione - exception captured
public static void illegalCode(Class<?> destination,
Class<?> source,
Throwable e)
destination - destination classsource - source classe - exception captured
public static void absentRelationship(Class<?> configuredClass,
Class<?> targetClass)
configuredClass - configured classtargetClass - target classpublic static void nullMappedClass(String className)
className - name of the classpublic static void interfaceClass(String className)
className - name of the classpublic static void emptyConstructorAbsent(Class<?> aClass)
aClass - class to analyze
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||