make Atom.val private

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@3530 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2009-04-22 20:48:08 +00:00
parent 1051fb55a3
commit 3ea30cbf7c
2 changed files with 11 additions and 2 deletions

View File

@ -35,7 +35,7 @@ public final class Atom implements Serializable {
/**
* The utf8 value this atom represents
*/
final byte val[];
private final byte val[];
/**
* Cached hash code for this atom key.
@ -365,6 +365,15 @@ public final class Atom implements Serializable {
return this == obj;
}
/**
* return an array of bytes representing the utf8 characters in this
*/
public byte[] getValArray() {
byte[] result = new byte[val.length];
System.arraycopy(val, 0, result, 0, val.length);
return result;
}
public byte getVal(int i) throws IllegalArgumentException {
try {
return val[i];

View File

@ -467,7 +467,7 @@ public class StringStuff {
if (a == null) {
throw new IllegalArgumentException("a is null");
}
ImmutableByteArray b = new ImmutableByteArray(a.val);
ImmutableByteArray b = new ImmutableByteArray(a.getValArray());
return parseForInnermostArrayElementDescriptor(b, 0, b.length());
}