Class filter, in need of

I'm looking for a class filter. Do you know of one? Do you have any pointers for designing one?
I'm thinking it would work like this:
You've got a big set of classes. These classes implement various interfaces- some implement one, some implement several.
You make a filter. The filter is a combination of interface-names and boolean operators. For example, you could make the filter "interface_x AND interface_y", and get all classes that implement both of those interfaces. Putting an OR in place of the AND would deliver classes that implemented EITHER of those 2 interfaces.
Simple?
Ok, so this filter would take a big string containing interface class names and standard boolean operators as it's parameter. Or something like that.
Does such a thing exist? It should. It seems really useful and fundamental and obvious.

-What do you mean "a big pile of classes"?
large undifferentiated set. Big list.
-Where do you get the classes?
Off my app's package tree
-Do you want to filter every class on the classpath?
not quite. All the irrelavent classes are weeded out when the pile is compiled.
-Do you have a list of relevant class names?
that would be the pile.
-If so, it seems like it would be easier to manage the list than to introspect the individual classes.
But the individual classes contain the details I want to inspect.
-An application of this, I would think, would be to allow you to drop in a class or a jar in a relevant place, and have the application discover it and deal appropriately with it, which is why I thought you might be interested in the service provider interface.
It seemed to be extra work. Easy enough to crawl the tree and inspect classes I figure.
-Maybe the BeanContext stuff would help?
I was thinking similarly. I looked at it some but I'll look at it some more.
-What invokes the filtering that you want?
A method with a filter specification (a boolean filter description consisting of class-names and boolean operators in reverse-polish) as a parameter.
-Once you filter, what are you planning to do with the result set?
Grab a class from it at random or some other logic or filter the set further.
U gonna write it for me too? =)
I'm just gonna write it. I already have it half written. It ain't so hard. My main issue/laziness was parsing my filter specifications (the boolean statements). I just discovered the marvels of reverse-polish notation. Wow! It's a breeze now.
Thanx
J

Similar Messages

  • How to invoke another class filter in servlet

    I want to ask about Filter in servlet. I have 3 class Filter :
    AFilter, BFilter, CFilter how can i invoke BFilter from AFilter and the BFilter invoke CFilter.
    AFilter -> BFilter -> CFilter
    How can i do that? What code should i put in web.xml?
    thank :)

    Filters are invoked in the order as its filter-mappings appear in web.xml.

  • Upgrade jdk 1.6.0_15 or higher which class jar I need, I am running eclipse

    Can someone tell me, if I have a class 12.jar with jdk 1.2 and upgrade jdk to 1.6.0_15 or higher, which class jar I need and where can I get it? Ideal would be with some instructions. :) Thanks so much.

    It's all here: http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html

  • I'm trying to reinstall Logic Pro 9, and it says It's already installed. I have a project due for class and I need help asap. Please help!!!

    I'm trying to reinstall Logic Pro 9, and it says It's already installed. I have a project due for class and I need help asap. Please help!!!

    Yea I am. I deleted Logic Pro 9 and moved the App to the Trashcan like normal. Then when I go to install it, it says its already Installed. When I do this with other apps; it works fine, the install thing comes back up like it should once you have deleted the app

  • In J2ME which class do we need to call to do ENcryption/Decryption?

    How many method we can implement from J2ME library?
    Can we use Triple DES, DES, AES ? Which class do we need to see?

    Hi,
    Generaly its not a good practice to modify SWCV you need to create in SLD then import it. Although if you want you can do it by opening SWCV in Repository then down the namespaces, you can see 2 check boxes named as Objects are original objects and Objects are modifiable. You need to check the option Objects are Modifiable.
    Then you can change it. I'hv not tried but check if it helps?
    BR
    Sudhir

  • Tomcat 6 and log in class Filter

    hi.
    in my servlet, i write
    log("Host ......  client ......= "+ requestHTTP.getRemoteHost());i have a good result in my file localhost.2010-08-30.log
    but, if i transfert this instruction in my class Filter :
    public class Journal implements Filter
         public void doFilter(ServletRequest request, ServletResponse reponse,FilterChain chaineFiltre) throws IOException, ServletException
               log("Host ......  client ......= "+ requestHTTP.getRemoteHost());
    }i dont have this information in my file localhost.2010-08-30.log :(
    how can i resolve this problem ?
    thx

    hi.
    if i do System.out.println(""Host ......  client ......= "+ requestHTTP.getRemoteHost()");i have a message in the shell.
    Edited by: slim_java on Aug 30, 2010 8:03 AM

  • The online course that I am taking uses firefox 4.0 but when I updated to 5.0 I can't access my classes. I need to go back to 4.0 to do my work. how do I get a 4.0 version, ASAP?

    I have been taking online courses at Colorado Tech and when my firefox updated to 55.0, my classes were mot accessible because they suppported version 4.0 or lower. I can't seem to find a version 4.0 to go back to, since 4.0 has been working fine for me. Iif not, I will have to go with google chrome. I need a solution ASAP.

    I had this same problem when my school's email page refused to work in Firefox 5. I solved it by installing the User Agent RG extension, then changing my user agent to IE7 before accessing my school email. Once you install the extension, you'll have to show your menu bar when you want to use it, then you'll find the User Agent submenu under the Tools menu. Hope this works for you, too.
    https://addons.mozilla.org/en-US/firefox/addon/user-agent-rg/

  • I have a class where I need to use SmartDraw but it is not compatible with Mac probook what are some other software programs I can use to make floorplans and building plans?

    I am suppose to download SmartDraw to my computer for a class but it is not compatible with Probook is there another program that does the same as SmartDraw?  I am planning a building addition and need it for the floor plans.  Any help would be greatly appreciated.

    There are lots of choices. Just go to the App Store and type in Cad Drawing in the search field. Also Sketchup from Google is a cloud based solution hat works pretty well.

  • Filter criteria needs to be saved as variant??

    Hi All,
        what i need to know is that  is it possible to save the filter criteria in BW reports as a variant ( Like R/3)  for future references?
    Need your advise please.
    Thanks and Regards

    Hi,
    Once you have saved a RKF, it would be available in the query designer on the left top above the normal key figures, you can drag and drop them either in the rows or columns depending on the requirements of the report and then see the result on execution of the query.
    Assign points if useful
    Regards
    Venkata Devaraj

  • Runnable Class doubles memory need of application

    Hi
    I use a class called DisplayTimer to throw an event every second. This class is Runnable and runs as an own thread. Then I have OrientedText2D Object in a java3d environment that listen to these events and update their caption (countdown time) every time they receive an event. So far so good, the solution works. BUT the memory need of my application doubles when i .start() the Runnable DisplayTimer class to start the event-throwing for the countdown captions...
    Here is the DisplayTimer class:
    import java.util.*;
    import de.qtobe.events.*;
    import de.qtobe.tools.*;
    public class DisplayTimer implements Runnable {
        private List _listeners = new ArrayList();
        Thread t;
        public DisplayTimer() {
            t = new Thread(this);
            t.start();
        public void run() {
            while (true) {
                _fireUpdateNotificationEvent();
                //Runtime r = Runtime.getRuntime();
                //System.out.println("before: " + r.freeMemory());
                //r.gc();
                //System.out.println("after: " + r.freeMemory());
                try {
                    Thread.currentThread().sleep(900);
                } catch (java.lang.InterruptedException e) {
                    Log.log("Error in DisplayTimer occured.");
        public synchronized void addUpdateNotificationListener(UpdateNotificationListener l) {
            _listeners.add(l);
        public synchronized void removeMoodListener(UpdateNotificationListener l) {
            _listeners.remove(l);
        private synchronized void _fireUpdateNotificationEvent() {
            UpdateNotificationEvent updateNotification = new UpdateNotificationEvent(this, false);
            Iterator listeners = _listeners.iterator();
            while (listeners.hasNext()) {
                ((UpdateNotificationListener) listeners.next()).updateNotificationReceived(updateNotification);
            updateNotification = null;
            listeners = null;
    }This is how the listeners react:
        public void updateNotificationReceived(UpdateNotificationEvent event) {
                if (this.impactInfo != null) {
                    //Ausgabe kommt in die "Machine"
                    //String caption = "Remaining service time: " + this.impactInfo.getFormattedRemainingServiceTime();
                    //caption += ", Countdown to breach of contract: " + this.impactInfo.getFormattedCountdown();
                    String caption = "" + this.impactInfo.getFormattedCountdown();
                    caption += " (remaining fullfill time: " + this.impactInfo.getFormattedRemainingServiceTime() + ")";
                    this.setCaption(caption);
                    if (impactInfo.getCountdownBreachContract() <= 0) {
                        this.setCaptionColor(Def.COLOR_RED);
                    } else {
                        this.setCaptionColor(Def.COLOR_HOTRED);
                    caption = null;
                }The events transport no information or data btw.
    Does anyone have an idea how I can optimize this solution?
    Thanks in advance!

    The common understanding is that the swf is loaded into memory at once and in full, and so embedded assets take up initial memory based on how much they contribute to the SWF size even before any of them get instantiated into their runtime class form.  This is certainly the case for Android or desktops that use the SWF, it isn't clear if the native iOS compiling ends up treating the embedded assets memory footprint in the same way or not, but possible.
    There is a compiler flag which you can add called -size-report=report.xml that can give you a complete breakdown of how  each type of data within the SWF contributes to the size in compressed form. It is most likely this memory footprint that contributes to loading the SWF (independent of actually instantiating or hydrating any of the embedded assets).
    http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf67110-7ff4.html#WS19 f279b149e7481c45454d9412c561d3223-8000
    There most likely are others here that know more details or might even want to correct some of these assumptions, but that is why most mobile developers choose to load assets from the filesystem if possible as opposed to embedding assets to avoid the extra memory hit on the initial SWF loading into memory.

  • Class or method needed to capture the event triggered

    Hi All,
           Help needed in finding the event triggered in ALV container.
    As per my requirement , I am registering the event mc_evt_modify for getting the search help(MEKK) in a ALV container . However it is triggered when ever I am inserting a row in ALV container and also the method data_changed is also triggered with that. But I don't want the method data_changed to be triggered.
    Is there any method or class which captures the event triggered so that I can put a condition on mc_evt_modify event.
    Please help me to resolve this issue.
    Regards,
    Srinivas

    Hi,
    You can check event ONF4
    "1 . --------------------   first register it
      DATA: it_f4 TYPE lvc_t_f4,
            wa_f4 TYPE lvc_s_f4.
      wa_f4-fieldname = 'CONNID'.
      wa_f4-register = 'X'.
      wa_f4-CHNGEAFTER = 'X'.
      APPEND wa_f4 TO it_f4.
    CALL METHOD g_alv_grid_ref->register_f4_for_fields
        EXPORTING
          it_f4 = it_f4.
    "2. --------------------------- now handle it
    handle_on_f4 FOR EVENT onf4 OF cl_gui_alv_grid
                               IMPORTING e_fieldname e_fieldvalue er_event_data,
    METHOD handle_on_f4.
        DATA: repid LIKE sy-repid,
              dynnr LIKE sy-dynnr,
              field TYPE help_info-dynprofld.
        repid = sy-repid.
        dynnr = sy-dynnr.
        field = e_fieldname.
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
          EXPORTING
            tabname           = 'SFLIGHT'
            fieldname         = 'CONNID'
            searchhelp        = "give search help here
            dynpprog          = repid
            dynpnr              = dynnr
            dynprofield       = field.  "return picked value to the one you are in
        "prevent furhter standard processing
        er_event_data->m_event_handled = 'X'.
      ENDMETHOD.                  
    Regards
    Marcin

  • In a filter, I need don't want to use match but contains

    So I will keep this simple
    function ffBuck(ds, row, index){
    return (row.Watershed.match("Buck")) ? row : null;
    That works great when Watershed = "Buck but what if Watershed ="Buck Salt and Red Creeks"
    I don't know too much javascript to do a string search and return. Any thoughts?
    Thanks for the help in advance,
    Jon

    Gramps,
    Thanks for the link. It isnt do what I want it to do but it is a helpful link for the future. I think in fact that the match javascript method is doing what I want it to do.
    Lets say that row.Watershed = "Buck and White Creek". That row is an indicator of what watershed a specific document is for. The are filtering through a large dataset of docs in an xml file. In that example the document is about two watersheds, Buck and White.
    I have a bunch of checkboxs with filters applied. If they click on the Buck Creek checkbox to see those documents for Buck Creek I fire the filter:
    function ffBuck(ds, row, index){
    return (row.Watershed.match("Buck")) ? row : null;
    My question was concerning how the match worked. I know that it would work if row.Watershed="Buck" but didnt know if the match wanted an exact match of "Buck" or whether it was finding any instance of "Buck" in the row.Watershed. If it wants a match, then I assume this means I have to write a regEx that tells it to look for any instance of Buck.
    Does that make sense? Thanks for your help.

  • In photoshop CC 2014 where did the oil paint filter go? it is the filter i need for almost every photo

    I cannot find the oil paint filter anymore in the recent version, it is not hidden in the paint galleries. I hope that Adobe did include it otherwise i cant use the updates anymore....

    You ARE going to put it back aren't you?
    Won't happen.
    You'll have to use the just-released 3rd party filter.
    Photoshop: Spring Cleaning | PHOTOSHOP.COM BLOG
    "Oil Paint is a very cool filter, but relied on a very large and complex code library used for an outdated technology (Pixel Bender) that is no longer supported.
    Update/note: It looks like a 3rd party has released a full PixelBender-esque plug-in that will work in CC. Haven’t tried it myself, but may interest those who liked Oil Paint and PixelBender: http://aescripts.com/pixel-bender-accelerator-for-photoshop/"

  • What classes do I need to make this "if" statement?

    what classes do I use or how do write code that basically says:
    if ( the key typed was not enter) {
    I couldn't figure it out using the keylistener.
    Thanks in advance.

    Use a KeyListener like this:
    JTextField textField = new JTextField();
    textField.addKeyListener(new KeyListener() {
         @Override
         public void keyPressed(KeyEvent e) {
              if (e.getKeyCode() == KeyEvent.VK_ENTER)
                   System.out.println("Enter pressed");
         @Override
         public void keyReleased(KeyEvent e) {
         @Override
         public void keyTyped(KeyEvent e) {
    });in keyPressed() and keyReleased() you can check for e.getKeyCode() == KeyEvent.VK_ENTER
    in keyTyped() you should check for e.getKeyChar() == '\n'

  • How Come My Flicker Filter Is Needed For Transitions To Take Out Black Bar?

    I have a Sony EX1 footage shot in 1920 108024p and when I made the sequence settings to same it still made me change the sequence settings to video when I dragged the clip onto timeline. Thats not the problem, its for everytime I have a transition I have to use the flicker filter so the transition doesnt end up as just a black bar frame. It did work until now as I have the video but the flicker filter didnt work as my exported film has a black bar where theres a transition. I am at a loss on what to do.

    First, try a system reset although I can't give you any confidence.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore, go into Recovery Mode per the instructions here.

Maybe you are looking for

  • Nomad Jukebox Zen Xtra 60GB not playing correctly anymore, help!!

    Thanks. I keep getting directed to that knowledge base page, but it is not addressing my problem. My computer immediately tells me that the device has "malfunctioned" and the computer does not recognize it. I only have the usb cord that came with the

  • WM RF Inventory : how to change the counting.

    Hello every body, We are using transaction LM50 and LM51 for the WM inventory counting with radio frequency terminals. My question is how is it possible the change the counting for one material in one bin ? The situation is that we have big bins with

  • SAP Query using internal table because of multiple records in KONV

    Hi Im using abap code to write to an internal table, how do you get the internal table fields to show in query report. Reason I have added abap code is I have a query for purchase order tables EKKO and EKPO. I would like to show any conditions attach

  • Buffered edge count FIFO overflow even at very low rates

    Dear Forums, I am trying to use a PXI-6608 to timestamp the sample clock of a PXI-4498 during analog input. Because the sample rate will be on the order of 20KHz, I want to use a pulse generation task on one counter to divide it down by a factor of 1

  • PSP elements12のインストール後のサインインができない

    この度.CANON EOS 70Dを購入したのですが.そのRAWデータが.使用していた Photoshop elements11では読めず.PSP elements12なら読めることが分かり. 不服ながら.PSP elements12のアプグレード版を購入し.9月7日にインストール しました. インストールは成功したのですが.実行すると登録のために「サインインが必要です」 と表示されます.adobe IDは持っているので.サインインすると.「インターネットに 接続して再試行してください」と表示さ