Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: jacomma/icm/io/EncObjectDecoder.java


1   /*
2    * $Source: /home/data/cvsroot/src/jacomma/icm/io/EncObjectDecoder.java,v $
3    * $Revision: 1.7 $
4    * $Date: 2000/10/28 20:09:07 $
5    *
6    * This file is part of the jacomma framework
7    * Copyright (c) 2000   Dimitrios Vyzovitis
8    *      mailto:dviz@egnatia.ee.auth.gr
9    *      
10   *
11   *      
12   *      
13   *      
14   *
15   *  This library is free software; you can redistribute it and/or modify
16   *  it under the terms of the GNU Library General Public License as published by
17   *  the Free Software Foundation; either version 2 of the License, or
18   *  (at your option) any later version.
19   *
20   *  This library is distributed in the hope that it will be useful,
21   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
22   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23   *  GNU Library General Public License for more details.
24   *
25   *  You should have received a copy of the GNU Library General Public License
26   *  along with this library; if not, write to the Free Software
27   *  Foundation, Inc., 59 Temple Place, Suite 330, 
28   *  Boston, MA  02111-1307  USA
29   */
30  
31  package jacomma.icm.io;
32  
33  import jacomma.util.Environment;
34  
35  /**
36   * TBA
37   **/
38  public interface EncObjectDecoder {
39  
40    public Object decode( EncObject obj );
41    public Object decode( EncObject obj, Object hint );
42  
43    public boolean canHandle( EncObject obj );
44    public boolean canHandle( EncObject obj, Object hint );
45    public boolean canHandle( EncObjectType t );
46    public boolean canHandleSome( EncObjectType t );
47    
48    public static interface Registry {
49      
50      public void load( java.util.Properties prop );
51      public EncObjectDecoder getDecoder( EncObject obj );
52      public EncObjectDecoder getDecoder( EncObject obj, Object hint );
53      public EncObjectDecoder getDecoder( EncObjectType t );
54      public void registerDecoder( java.util.Collection types, Class c );
55      public void registerDecoder( EncObjectType t, EncObjectDecoder enc );
56      public void unregisterDecoder( EncObjectType t, EncObjectDecoder enc );
57      
58      public void dump();
59      
60      public static final Registry instance = (Registry)Environment.newRegistry( EncObjectDecoder.class );
61      
62    }
63  
64  }