summaryrefslogtreecommitdiffstats
path: root/src/codegen/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2011-02-01 16:04:41 +0000
committerJeremias Maerki <jeremias@apache.org>2011-02-01 16:04:41 +0000
commit941181b8e3bf0369f1803e9af89bff52c0c93c8f (patch)
tree0047b09b9a6564ff030fdf36f79f662d43ab0a94 /src/codegen/java/org
parentf540b00cf2c8cf1126f6d45e3a9062b2bccd7a58 (diff)
downloadxmlgraphics-fop-941181b8e3bf0369f1803e9af89bff52c0c93c8f.tar.gz
xmlgraphics-fop-941181b8e3bf0369f1803e9af89bff52c0c93c8f.zip
Allow afp:no-operation to be added to fo:page-sequence (page group in AFP) and fo:declarations (document in AFP). Includes a test case.
Update QDox to avoid a bug with class private enums. Connect some older test cases into the standard test suite. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1066078 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/codegen/java/org')
-rw-r--r--src/codegen/java/org/apache/fop/tools/EventProducerCollector.java15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/codegen/java/org/apache/fop/tools/EventProducerCollector.java b/src/codegen/java/org/apache/fop/tools/EventProducerCollector.java
index 4721f41df..7b103e0cd 100644
--- a/src/codegen/java/org/apache/fop/tools/EventProducerCollector.java
+++ b/src/codegen/java/org/apache/fop/tools/EventProducerCollector.java
@@ -21,7 +21,6 @@ package org.apache.fop.tools;
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
@@ -47,10 +46,10 @@ import com.thoughtworks.qdox.model.Type;
class EventProducerCollector {
private static final String CLASSNAME_EVENT_PRODUCER = EventProducer.class.getName();
- private static final Map PRIMITIVE_MAP;
+ private static final Map<String, Class<?>> PRIMITIVE_MAP;
static {
- Map m = new java.util.HashMap();
+ Map <String, Class<?>> m = new java.util.HashMap<String, Class<?>>();
m.put("boolean", Boolean.class);
m.put("byte", Byte.class);
m.put("char", Character.class);
@@ -63,7 +62,7 @@ class EventProducerCollector {
}
private DocletTagFactory tagFactory;
- private List models = new ArrayList();
+ private List<EventModel> models = new java.util.ArrayList<EventModel>();
/**
* Creates a new EventProducerCollector.
@@ -139,7 +138,7 @@ class EventProducerCollector {
throws EventConventionException, ClassNotFoundException {
JavaClass clazz = method.getParentClass();
//Check EventProducer conventions
- if (!method.getReturns().isVoid()) {
+ if (!method.getReturnType().isVoid()) {
throw new EventConventionException("All methods of interface "
+ clazz.getFullyQualifiedName() + " must have return type 'void'!");
}
@@ -168,10 +167,10 @@ class EventProducerCollector {
if (params.length > 1) {
for (int j = 1, cj = params.length; j < cj; j++) {
JavaParameter p = params[j];
- Class type;
+ Class<?> type;
JavaClass pClass = p.getType().getJavaClass();
if (p.getType().isPrimitive()) {
- type = (Class)PRIMITIVE_MAP.get(pClass.getName());
+ type = PRIMITIVE_MAP.get(pClass.getName());
if (type == null) {
throw new UnsupportedOperationException(
"Primitive datatype not supported: " + pClass.getName());
@@ -197,7 +196,7 @@ class EventProducerCollector {
* Returns the event model that has been accumulated.
* @return the event model.
*/
- public List getModels() {
+ public List<EventModel> getModels() {
return this.models;
}