Constructs a GuardedObject using the specified object and guard.
If the Guard object is null, then no restrictions will
be placed on who can access the object.
Parameters:
-
object - the object to be guarded.
-
guard - the Guard object that guards access to the object.