aboutsummaryrefslogtreecommitdiff
path: root/java/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/main')
-rw-r--r--java/src/main/java/org/pablotron/luigi/actions/package-info.java4
-rw-r--r--java/src/main/java/org/pablotron/luigi/errors/FilterError.java8
-rw-r--r--java/src/main/java/org/pablotron/luigi/errors/LuigiError.java8
-rw-r--r--java/src/main/java/org/pablotron/luigi/errors/UnknownEntryError.java18
-rw-r--r--java/src/main/java/org/pablotron/luigi/errors/UnknownFilterError.java11
-rw-r--r--java/src/main/java/org/pablotron/luigi/errors/UnknownKeyError.java11
-rw-r--r--java/src/main/java/org/pablotron/luigi/errors/UnknownTemplateError.java8
-rw-r--r--java/src/main/java/org/pablotron/luigi/errors/package-info.java4
-rw-r--r--java/src/main/java/org/pablotron/luigi/package-info.java4
9 files changed, 73 insertions, 3 deletions
diff --git a/java/src/main/java/org/pablotron/luigi/actions/package-info.java b/java/src/main/java/org/pablotron/luigi/actions/package-info.java
new file mode 100644
index 0000000..b90d568
--- /dev/null
+++ b/java/src/main/java/org/pablotron/luigi/actions/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Template parser actions.
+ */
+package org.pablotron.luigi.actions;
diff --git a/java/src/main/java/org/pablotron/luigi/errors/FilterError.java b/java/src/main/java/org/pablotron/luigi/errors/FilterError.java
index f2ff7fb..1761156 100644
--- a/java/src/main/java/org/pablotron/luigi/errors/FilterError.java
+++ b/java/src/main/java/org/pablotron/luigi/errors/FilterError.java
@@ -1,6 +1,14 @@
package org.pablotron.luigi.errors;
+/**
+ * Wrapper for errors that occur during a Filter.Handler invocation.
+ */
public class FilterError extends LuigiError {
+ /**
+ * Wrapper for errors that occur during a Filter.Handler invocation.
+ *
+ * @param message Error message.
+ */
public FilterError(final String message) {
super(message);
}
diff --git a/java/src/main/java/org/pablotron/luigi/errors/LuigiError.java b/java/src/main/java/org/pablotron/luigi/errors/LuigiError.java
index abf9280..8cf9bc8 100644
--- a/java/src/main/java/org/pablotron/luigi/errors/LuigiError.java
+++ b/java/src/main/java/org/pablotron/luigi/errors/LuigiError.java
@@ -1,6 +1,14 @@
package org.pablotron.luigi.errors;
+/**
+ * Base class for all errors raised by this library.
+ */
public class LuigiError extends Exception {
+ /**
+ * Create a new LuigiError instance.
+ *
+ * @param message Error message.
+ */
public LuigiError(final String message) {
super(message);
}
diff --git a/java/src/main/java/org/pablotron/luigi/errors/UnknownEntryError.java b/java/src/main/java/org/pablotron/luigi/errors/UnknownEntryError.java
index 7710838..7ce1f9b 100644
--- a/java/src/main/java/org/pablotron/luigi/errors/UnknownEntryError.java
+++ b/java/src/main/java/org/pablotron/luigi/errors/UnknownEntryError.java
@@ -1,9 +1,25 @@
package org.pablotron.luigi.errors;
-public class UnknownEntryError extends LuigiError {
+/**
+ * Base class for all unknown entry errors raised by this library.
+ */
+public abstract class UnknownEntryError extends LuigiError {
+ /**
+ * Entry type (e.g. "template", "key", or "filter").
+ */
public final String type;
+
+ /**
+ * Entry name.
+ */
public final String name;
+ /**
+ * This is an abstract class and cannot be instantiated directly.
+ *
+ * @param type Entry type ("template", "key", or "filter").
+ * @param name Entry name.
+ */
public UnknownEntryError(final String type, final String name) {
super(String.format("unknown %s: %s", type, name));
diff --git a/java/src/main/java/org/pablotron/luigi/errors/UnknownFilterError.java b/java/src/main/java/org/pablotron/luigi/errors/UnknownFilterError.java
index 7396da6..ce5ed4b 100644
--- a/java/src/main/java/org/pablotron/luigi/errors/UnknownFilterError.java
+++ b/java/src/main/java/org/pablotron/luigi/errors/UnknownFilterError.java
@@ -1,6 +1,15 @@
package org.pablotron.luigi.errors;
-public class UnknownFilterError extends UnknownEntryError {
+/**
+ * Thrown when an unknown filter is encountered while running a
+ * template.
+ */
+public final class UnknownFilterError extends UnknownEntryError {
+ /**
+ * Create a new UnknownFilterError instance.
+ *
+ * @param name Unknown filter name.
+ */
public UnknownFilterError(final String name) {
super("filter", name);
}
diff --git a/java/src/main/java/org/pablotron/luigi/errors/UnknownKeyError.java b/java/src/main/java/org/pablotron/luigi/errors/UnknownKeyError.java
index 7b0ae4c..8710a83 100644
--- a/java/src/main/java/org/pablotron/luigi/errors/UnknownKeyError.java
+++ b/java/src/main/java/org/pablotron/luigi/errors/UnknownKeyError.java
@@ -1,6 +1,15 @@
package org.pablotron.luigi.errors;
-public class UnknownKeyError extends UnknownEntryError {
+/**
+ * Thrown when an unknown key is encountered while running a
+ * template.
+ */
+public final class UnknownKeyError extends UnknownEntryError {
+ /**
+ * Create a new UnknownKeyError instance.
+ *
+ * @param name Unknown key.
+ */
public UnknownKeyError(final String name) {
super("key", name);
}
diff --git a/java/src/main/java/org/pablotron/luigi/errors/UnknownTemplateError.java b/java/src/main/java/org/pablotron/luigi/errors/UnknownTemplateError.java
index e6b4682..1baa52f 100644
--- a/java/src/main/java/org/pablotron/luigi/errors/UnknownTemplateError.java
+++ b/java/src/main/java/org/pablotron/luigi/errors/UnknownTemplateError.java
@@ -1,6 +1,14 @@
package org.pablotron.luigi.errors;
+/**
+ * Thrown when an unknown template is requested from a Cache.
+ */
public class UnknownTemplateError extends UnknownEntryError {
+ /**
+ * Create a new UnknownTemplateError instance.
+ *
+ * @param name Unknown template name.
+ */
public UnknownTemplateError(final String name) {
super("template", name);
}
diff --git a/java/src/main/java/org/pablotron/luigi/errors/package-info.java b/java/src/main/java/org/pablotron/luigi/errors/package-info.java
new file mode 100644
index 0000000..0da9a26
--- /dev/null
+++ b/java/src/main/java/org/pablotron/luigi/errors/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Contains errors raised by Luigi Template.
+ */
+package org.pablotron.luigi.errors;
diff --git a/java/src/main/java/org/pablotron/luigi/package-info.java b/java/src/main/java/org/pablotron/luigi/package-info.java
new file mode 100644
index 0000000..e2b09be
--- /dev/null
+++ b/java/src/main/java/org/pablotron/luigi/package-info.java
@@ -0,0 +1,4 @@
+/**
+ * Luigi Template namespace.
+ */
+package org.pablotron.luigi;