From b0758ce498793c5e130493d9a03d7632de152855 Mon Sep 17 00:00:00 2001 From: Michael Bien Date: Tue, 1 Dec 2009 23:24:30 +0100 Subject: Code cleanup. Ported package com.sun.gluegen to java 5 language level. --- src/java/com/sun/gluegen/ConstantDefinition.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/java/com/sun/gluegen/ConstantDefinition.java') diff --git a/src/java/com/sun/gluegen/ConstantDefinition.java b/src/java/com/sun/gluegen/ConstantDefinition.java index 44ce8e0..e4cb3f5 100644 --- a/src/java/com/sun/gluegen/ConstantDefinition.java +++ b/src/java/com/sun/gluegen/ConstantDefinition.java @@ -38,13 +38,14 @@ import java.util.*; /** Represents the definition of a constant which was provided either via a #define statement or through an enum definition. */ public class ConstantDefinition { + private String origName; - private HashSet aliasedNames; + private HashSet aliasedNames; private String name; private String value; private boolean isEnum; private String enumName; - private Set/**/ aliases; + private Set aliases; public ConstantDefinition(String name, String value, @@ -55,7 +56,7 @@ public class ConstantDefinition { this.value = value; this.isEnum = isEnum; this.enumName = enumName; - this.aliasedNames=new HashSet(); + this.aliasedNames=new HashSet(); } public boolean equals(ConstantDefinition other) { @@ -75,6 +76,7 @@ public class ConstantDefinition { return s1.equals(s2); } + @Override public int hashCode() { return name.hashCode(); } @@ -90,7 +92,7 @@ public class ConstantDefinition { public void addAliasedName(String name) { aliasedNames.add(name); } - public Collection getAliasedNames() { + public Collection getAliasedNames() { return aliasedNames; } @@ -109,13 +111,13 @@ public class ConstantDefinition { public boolean isEnum() { return isEnum; } - public Set/**/ getAliases() { + public Set getAliases() { return aliases; } public void addAlias(String alias) { if (aliases == null) { - aliases = new LinkedHashSet/**/(); + aliases = new LinkedHashSet(); } aliases.add(alias); } -- cgit v1.2.3