aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/FunctionEmitter.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/com/sun/gluegen/FunctionEmitter.java')
-rw-r--r--src/java/com/sun/gluegen/FunctionEmitter.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/java/com/sun/gluegen/FunctionEmitter.java b/src/java/com/sun/gluegen/FunctionEmitter.java
index 3fa6f03..0d0f225 100644
--- a/src/java/com/sun/gluegen/FunctionEmitter.java
+++ b/src/java/com/sun/gluegen/FunctionEmitter.java
@@ -47,7 +47,7 @@ public abstract class FunctionEmitter
{
public static final EmissionModifier STATIC = new EmissionModifier("static");
- private HashSet modifiers = new HashSet(4);
+ private ArrayList modifiers = new ArrayList();
private CommentEmitter commentEmitter = null;
private PrintWriter defaultOutput;
@@ -64,7 +64,7 @@ public abstract class FunctionEmitter
* Makes this FunctionEmitter a copy of the passed one.
*/
public FunctionEmitter(FunctionEmitter arg) {
- modifiers = (HashSet) arg.modifiers.clone();
+ modifiers = (ArrayList) arg.modifiers.clone();
commentEmitter = arg.commentEmitter;
defaultOutput = arg.defaultOutput;
}
@@ -203,6 +203,19 @@ public abstract class FunctionEmitter
public final String toString() { return emittedForm; }
private String emittedForm;
+
+ public int hashCode() {
+ return emittedForm.hashCode();
+ }
+
+ public boolean equals(Object arg) {
+ if (arg == null || (!(arg instanceof EmissionModifier))) {
+ return false;
+ }
+
+ return emittedForm.equals(((EmissionModifier) arg).emittedForm);
+ }
+
protected EmissionModifier(String emittedForm) { this.emittedForm = emittedForm; }
}
}