public class MyClassA { MyClassB mMyClassB; public MyClassA(MyClassB b) { mMyClassB = b; } public void hoge() { if (mMyClassB.getPriority() > 0) { handleHighPriority(); } else { handleLowPriority(); } } public void handleHighPriority() { ... } public void handleLowPriority() { ... } } public class MyClassB { private int mPriority; public int getPriority() { return mPriority; } // 内部の処理で mPriority