Esempio n. 1
0
/**
 * Set the entire set of method attributes with one call.  Used
 * during source compilation.
 *
 * @param _access   The access setting.
 * @param _protected The protected setting.
 * @param _guarded   The guarded setting.
 */
void MethodClass::setAttributes(AccessFlag _access, ProtectedFlag _protected, GuardFlag _guarded)
{
    switch (_access)
    {
        case PRIVATE_SCOPE:
            setPrivate();
            break;

        case PACKAGE_SCOPE:
            setPackageScope();
            break;

        // covers PUBLIC and DEFAULT
        default:
            break;
    }

    if (_protected == PROTECTED_METHOD)
    {
        setProtected();
    }

    // both GUARDED and DEFAULT are guarded, so check for the reverse.
    if (_guarded == UNGUARDED_METHOD)
    {
        setUnguarded();
    }
}
/**
 * Set the entire set of method attributes with one call.  Used
 * during source compilation.
 *
 * @param _private   The private setting.
 * @param _protected The protected setting.
 * @param _guarded   The guarded setting.
 */
void MethodClass::setAttributes(bool _private, bool _protected, bool _guarded)
{
    if (_private)
    {
        setPrivate();
    }
    if (_protected)
    {
        setProtected();
    }
    // guarded is the default, so we need to reverse this
    if (!_guarded)
    {
        setUnguarded();
    }
}
Esempio n. 3
0
/**
 * Change the guarded state of the method from Rexx code.
 *
 * @return No return value.
 */
RexxObject *MethodClass::setUnguardedRexx()
{
    setUnguarded();
    return OREF_NULL;
}