pbwest      2004/01/14 06:59:05

  Modified:    src/java/org/apache/fop/fo Tag: FOP_0-20-0_Alt-Design
                        FObjects.java
  Log:
  Removed redundant statement from makeFlowObject
  Added Javadoc comments
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.5   +33 -10    xml-fop/src/java/org/apache/fop/fo/Attic/FObjects.java
  
  Index: FObjects.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/Attic/FObjects.java,v
  retrieving revision 1.1.2.4
  retrieving revision 1.1.2.5
  diff -u -r1.1.2.4 -r1.1.2.5
  --- FObjects.java     14 Jan 2004 14:40:19 -0000      1.1.2.4
  +++ FObjects.java     14 Jan 2004 14:59:05 -0000      1.1.2.5
  @@ -77,19 +77,24 @@
   
       public static final String packageNamePrefix = "org.apache.fop";
   
  +    /**
  +     * Create a singleton FObjects object
  +     */
       public static final FObjects fobjects;
       static {
  -        //try {
  -            fobjects = new FObjects();
  -        //} catch (FOPException e) {
  -            //throw new RuntimeException(e.getMessage());
  -        //}
  +        fobjects = new FObjects();
       }
   
  +    /**
  +     * @return the singleton
  +     */
       public static final FObjects getFObjects() {
           return fobjects;
       }
   
  +    /**
  +     * FObjects cannot be instantiated
  +     */
       private FObjects() {}
   
       /**
  @@ -300,23 +305,41 @@
                       "Attempt to makeFlowObject() with XMLEvent for event type "
                       + XMLEvent.eventTypeName(event.getType()));
           }
  -        int foType = FObjectNames.PCDATA;
  -
           return new FoPcdata(foTree, parent, event, stateFlags);
       }
   
  +    /**
  +     * Get the index of an unqualified FO class name
  +     * @param name of the FO
  +     * @return the index
  +     */
       public static int getFoIndex(String name) {
           return ((Integer)(foToIndex.get(name))).intValue();
       }
   
  +    /**
  +     * Get the unqualified class name of the indicated FO
  +     * @param foIndex of the rwquired FO
  +     * @return the unqualified class name
  +     */
       public static String getClassName(int foIndex) {
           return foClassNames[foIndex];
       }
   
  +    /**
  +     * Get the fully-qualified class name of the indicated FO
  +     * @param foIndex of the required FO
  +     * @return the fully-qualified class name
  +     */
       public static String getPkgClassName(int foIndex) {
           return foPkgClassNames[foIndex];
       }
   
  +    /**
  +     * Get the <code>Constructor</code> object for a given FO
  +     * @param foIndex of the FO
  +     * @return the <code>Constructor</code>
  +     */
       public Constructor getConstructor(int foIndex) {
           return foConstructors[foIndex];
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to