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:
parent
1051fb55a3
commit
3ea30cbf7c
|
@ -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];
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue