KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > sf > invicta > type > InvictaTypeException


1
2 package net.sf.invicta.type;
3
4 import net.sf.invicta.InvictaException;
5  
6 /**
7  *
8  */

9 public class InvictaTypeException extends InvictaException {
10
11     /**
12      * @param message
13      */

14     public InvictaTypeException(String JavaDoc message) {
15         super(message);
16     }
17     
18     
19     public static InvictaTypeException typeInheritanceCycle(String JavaDoc typeName) {
20         return new InvictaTypeException(
21             "Type definition inheritance cycle. Involved type: '" + typeName + "'");
22     }
23
24     public static InvictaTypeException typeDefinitionNotFound(String JavaDoc typeName) {
25         return new InvictaTypeException(
26             "Definition file for type '" + typeName + "' was not found.");
27     }
28     
29     public static InvictaTypeException conflictingDefinedProperties(String JavaDoc typeName, String JavaDoc propertyName) {
30         return new InvictaTypeException(
31             "Conflicting defined properties for '" + propertyName + "' for type '" + typeName + "'");
32     }
33     
34     public static InvictaTypeException duplicateTargetTemplate(String JavaDoc typeName, String JavaDoc targetName) {
35         return new InvictaTypeException(
36             "Duplicate target template '" + targetName + "' for type '" + typeName + "'");
37     }
38     
39     public static InvictaTypeException conflictingTargetTemplates(String JavaDoc typeName, String JavaDoc targetName) {
40         return new InvictaTypeException(
41             "Conflicting target template '" + targetName + "' for type '" + typeName + "'");
42     }
43     
44     public static InvictaTypeException parentTargetUndefined(String JavaDoc typeName, String JavaDoc targetName) {
45         return new InvictaTypeException(
46             "Target '" + targetName + "' is not defined for a parent of '" + typeName + "'");
47     }
48     
49     public static InvictaTypeException targetUndefined(String JavaDoc typeName, String JavaDoc targetName) {
50         return new InvictaTypeException(
51             "Target '" + targetName + "' is undefined for type '" + typeName + "'");
52     }
53
54     public static InvictaTypeException missingPropertyAttribute(String JavaDoc name, String JavaDoc attribute) {
55         return new InvictaTypeException(
56             "Attribute '" + attribute + "' must be specified for property '" + name);
57     }
58         
59 }
60
Popular Tags