Package java.util

Examples of java.util.ArrayList.toArray()


            }
            start = mark + 1;
        }
        paths.add(".");
        String[] clsspths = new String[paths.size()];
        paths.toArray(clsspths);
        return clsspths;
    }
   
    /**
     * Extract base file name from a full path.
View Full Code Here


            String schema = (String) iterator.next();
            args.add(new File(schema).toURI().toString());
        }
        try {
            getLog().info("Generating Java sources in " + getTargetDirectory() + " from schemas available in " + getDirectory() + "...");
            CodeGen.main((String[]) args.toArray(new String[args.size()]));
        } catch (JiBXException e) {
            Throwable cause = (e.getRootCause() != null) ? e.getRootCause() : e;
            throw new MojoExecutionException(cause.getLocalizedMessage(), cause);
        } catch (Exception e) {
            Throwable cause = (e.getCause() != null) ? e.getCause() : e;
View Full Code Here

      catch (NumberFormatException nfe)
      {
        throw new ParseException("Failed to parse array index", getLocator());
      }
    }
    retval = list.toArray();
  }

  /**
   * Returns the object for this element or null, if this element does
   * not create an object.
View Full Code Here

  public static InternalDemoHandler[] getAllDemoHandlers()
  {
    final DemoSelector selector = DemoFrontend.createDemoInfo();
    final ArrayList demos = new ArrayList();
    collectDemos(demos, selector);
    return (InternalDemoHandler[]) demos.toArray(
            new InternalDemoHandler[demos.size()]);
  }

  private static void collectDemos(final ArrayList list, final DemoSelector selector)
  {
View Full Code Here

  public static XmlDemoHandler[] getAllXmlDemoHandlers()
  {
    final DemoSelector selector = DemoFrontend.createDemoInfo();
    final ArrayList demos = new ArrayList();
    collectXmlDemos(demos, selector);
    return (XmlDemoHandler[]) demos.toArray(new XmlDemoHandler[demos.size()]);
  }

  private static void collectXmlDemos(final ArrayList list, final DemoSelector selector)
  {
    final DemoHandler[] demoHandlers = selector.getDemos();
View Full Code Here

                keywords.toArray(keywordParameters);
            } else
                keywordParameters = null;
            if (aux != null) {
                auxVars = new Parameter[aux.size()];
                aux.toArray(auxVars);
            } else
                auxVars = null;
        } else {
            // Lambda list is empty.
            Debug.assertTrue(lambdaList == NIL);
View Full Code Here

                if (keywordParameters[i].svar != NIL)
                    vars.add(keywordParameters[i].svar);
            }
        }
        Symbol[] array = new Symbol[vars.size()];
        vars.toArray(array);
        return array;
    }

    private static final void invalidParameter(LispObject obj)
        throws ConditionThrowable
View Full Code Here

      {
        final Number n = (Number) value;
        numbers.add(n);
      }
    }
    return (Number[]) numbers.toArray(new Number[numbers.size()]);
  }

}
View Full Code Here

      {
        continue;
      }
      filteredList.add(mapping);
    }
    return (ParameterMapping[]) filteredList.toArray(new ParameterMapping[filteredList.size()]);
  }

  /**
   * Checks whether a global import is defined. A global import effectly overrides all other imports.
   *
 
View Full Code Here

        columnNames.add(pos.getPrefix() + '.' + tableModel.getColumnName(c)); //$NON-NLS-1$
        columnTypes.add(tableModel.getColumnClass(c));
      }
    }
    this.columnNames = (String[]) columnNames.toArray(new String[columnNames.size()]);
    this.columnTypes = (Class[]) columnTypes.toArray(new Class[columnTypes.size()]);
    this.rowCount = rowOffset;
    fireTableStructureChanged();
  }

  protected synchronized void updateRowCount()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.