/** * Determine whether this method is callable from the given object using * the given call type. * * @param caller The calling object * @param callType The type of call * @return true if the call would not violate visibility; false otherwise */ public boolean isCallableFrom(IRubyObject caller, CallType callType) { switch (visibility) { case PUBLIC: return true; case PRIVATE: return callType != CallType.NORMAL; case PROTECTED: return protectedAccessOk(caller); } return true; }
/** * Determine whether this method is callable from the given object using * the given call type. * * @param caller The calling object * @param callType The type of call * @return true if the call would not violate visibility; false otherwise */ public boolean isCallableFrom(IRubyObject caller, CallType callType) { switch (visibility) { case PUBLIC: return true; case PRIVATE: return callType != CallType.NORMAL; case PROTECTED: return protectedAccessOk(caller); } return true; }
/** * Determine whether this method is callable from the given object using * the given call type. * * @param caller The calling object * @param callType The type of call * @return true if the call would not violate visibility; false otherwise */ public boolean isCallableFrom(IRubyObject caller, CallType callType) { switch (Visibility.getValues()[visibility]) { case PUBLIC: return true; case PRIVATE: return callType != CallType.NORMAL; case PROTECTED: return protectedAccessOk(caller); } return true; }
/** * Determine whether this method is callable from the given object using * the given call type. * * @param caller The calling object * @param callType The type of call * @return true if the call would not violate visibility; false otherwise */ public boolean isCallableFrom(IRubyObject caller, CallType callType) { switch (Visibility.getValues()[visibility]) { case PUBLIC: return true; case PRIVATE: return callType != CallType.NORMAL; case PROTECTED: return protectedAccessOk(caller); } return true; }