rename computeMethodMap() to computeMethodMapIfNeeded()

This commit is contained in:
Manu Sridharan 2013-05-07 14:59:12 -07:00
parent bc2594237b
commit 89e90cd44e
2 changed files with 4 additions and 4 deletions

View File

@ -386,7 +386,7 @@ public abstract class BytecodeClass<T extends IClassLoader> implements IClass {
*/
public Collection<IMethod> getDeclaredMethods() {
try {
computeMethodMap();
computeMethodMapIfNeeded();
} catch (InvalidClassFileException e) {
e.printStackTrace();
Assertions.UNREACHABLE();
@ -399,7 +399,7 @@ public abstract class BytecodeClass<T extends IClassLoader> implements IClass {
*/
public IMethod getMethod(Selector selector) {
try {
computeMethodMap();
computeMethodMapIfNeeded();
} catch (InvalidClassFileException e1) {
e1.printStackTrace();
Assertions.UNREACHABLE();
@ -549,7 +549,7 @@ public abstract class BytecodeClass<T extends IClassLoader> implements IClass {
/**
* set up the methodMap mapping
*/
protected void computeMethodMap() throws InvalidClassFileException {
protected void computeMethodMapIfNeeded() throws InvalidClassFileException {
if (methodMap == null) {
synchronized (this) {
if (methodMap == null) {

View File

@ -65,7 +65,7 @@ public abstract class JVMClass<T extends IClassLoader> extends BytecodeClass<T>
*/
public IMethod getClassInitializer() {
try {
computeMethodMap();
computeMethodMapIfNeeded();
} catch (InvalidClassFileException e) {
e.printStackTrace();
Assertions.UNREACHABLE();