summaryrefslogtreecommitdiffstats
path: root/src/java/com/jogamp/gluegen/ConstantDefinition.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
committerSven Gothel <[email protected]>2014-07-03 16:06:47 +0200
commitdf9ff7f340a5ab4e07efc613f5f264eeae63d4c7 (patch)
tree239ae276b82024b140428e6c0fe5d739fdd686a4 /src/java/com/jogamp/gluegen/ConstantDefinition.java
parenteb47aaba63e3b1bf55f274a0f338f1010a017ae4 (diff)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74)
Code Clean-Up based on our Recommended Settings (jogamp-scripting c47bc86ae2ee268a1f38c5580d11f93d7f8d6e74) - Change non static accesses to static members using declaring type - Change indirect accesses to static members to direct accesses (accesses through subtypes) - Add final modifier to private fields - Add final modifier to method parameters - Add final modifier to local variables - Remove unnecessary casts - Remove unnecessary '$NON-NLS$' tags - Remove trailing white spaces on all lines
Diffstat (limited to 'src/java/com/jogamp/gluegen/ConstantDefinition.java')
-rw-r--r--src/java/com/jogamp/gluegen/ConstantDefinition.java28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/java/com/jogamp/gluegen/ConstantDefinition.java b/src/java/com/jogamp/gluegen/ConstantDefinition.java
index 9edb827..ca67001 100644
--- a/src/java/com/jogamp/gluegen/ConstantDefinition.java
+++ b/src/java/com/jogamp/gluegen/ConstantDefinition.java
@@ -39,18 +39,18 @@ import java.util.*;
via a #define statement or through an enum definition. */
public class ConstantDefinition {
- private String origName;
- private HashSet<String> aliasedNames;
+ private final String origName;
+ private final HashSet<String> aliasedNames;
private String name;
- private String value;
- private boolean isEnum;
- private String enumName;
+ private final String value;
+ private final boolean isEnum;
+ private final String enumName;
private Set<String> aliases;
- public ConstantDefinition(String name,
- String value,
- boolean isEnum,
- String enumName) {
+ public ConstantDefinition(final String name,
+ final String value,
+ final boolean isEnum,
+ final String enumName) {
this.origName = name;
this.name = name;
this.value = value;
@@ -59,13 +59,13 @@ public class ConstantDefinition {
this.aliasedNames=new HashSet<String>();
}
- public boolean equals(ConstantDefinition other) {
+ public boolean equals(final ConstantDefinition other) {
return (equals(name, other.name) &&
equals(value, other.value) &&
equals(enumName, other.enumName));
}
- private boolean equals(String s1, String s2) {
+ private boolean equals(final String s1, final String s2) {
if (s1 == null || s2 == null) {
if (s1 == null && s2 == null) {
return true;
@@ -82,14 +82,14 @@ public class ConstantDefinition {
}
/** Supports renaming in Java binding. */
- public void rename(String name) {
+ public void rename(final String name) {
if(null!=name) {
this.name = name;
aliasedNames.add(origName);
}
}
- public void addAliasedName(String name) {
+ public void addAliasedName(final String name) {
aliasedNames.add(name);
}
public Collection<String> getAliasedNames() {
@@ -115,7 +115,7 @@ public class ConstantDefinition {
return aliases;
}
- public void addAlias(String alias) {
+ public void addAlias(final String alias) {
if (aliases == null) {
aliases = new LinkedHashSet<String>();
}