The Artima Developer Community
Sponsored Link

Java Buzz Forum
ObjectFilter Test Object Model

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
ObjectFilter Test Object Model Posted: Apr 27, 2004 3:46 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: ObjectFilter Test Object Model
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

Just to verify there is no magic going on in the objects themselves:

The aspects handle the filtering, not the classes. They are ignorant of the filter. Also, they are uneffected by it:

    public void testBlockReference()
    {
        Filter filter = Filter.instance();
        filter.setActor(new Object());
        filter.addRules(Teacher.class, new Rules()
        {
            public boolean allow(Object actor, Object instance)
            {
                return false;
            }
        });

        Teacher mr_brown = new Teacher("Mr. Brown");
        ClassRoom english = new ClassRoom(mr_brown);
        assertNull(english.getTeacher());
        filter.clearActor();
        assertEquals(mr_brown, english.getTeacher();
    }

By default, if no actor is set nothing is filtered (this is really important).

Read: ObjectFilter Test Object Model

Topic: Getting started with Jini 2.0 Previous Topic   Next Topic Topic: Crypto-Gram has an RSS feed

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use