Package java.beans

Examples of java.beans.BeanDescriptor


  /**
   * @see java.beans.BeanInfo#getBeanDescriptor()
   */
  public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(BEAN);
    bd.setName("maxInclusive");
    bd.setDisplayName(XMLBean.concatName(schema.XSD_URI, "maxInclusive"));
    bd.setValue("ignore", new String[] { schema.XSD_URI+"#annotation" });
    return bd;
  }
View Full Code Here


  /**
   * @see java.beans.BeanInfo#getBeanDescriptor()
   */
  public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(BEAN);
    bd.setName("attributeGroup");
    bd.setDisplayName(XMLBean.concatName(schema.XSD_URI, "attributeGroup"));
    bd.setValue("ignore", new String[] { schema.XSD_URI+"#annotation" });
    return bd;
  }
View Full Code Here

public class allBeanInfo extends XMLBeanInfo implements BeanInfo {

  private static final Class BEAN = all.class;

  public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(all.class);
    bd.setName("all");
    bd.setDisplayName(XMLBean.concatName(schema.XSD_URI, "all"));
    bd.setValue("ignore", new String[] { schema.XSD_URI+"#annotation" });
    try {
      bd.setValue(
        "content",
        new DTDSequence(
          new XMLBean[] {
            // optional annotation element
            new DTDElement(schema.XSD_URI, "annotation", "0", "1"),
View Full Code Here

  /**
   * @see java.beans.BeanInfo#getBeanDescriptor()
   */
  public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(BEAN);
    bd.setName("import");
    bd.setDisplayName(XMLBean.concatName(schema.XSD_URI, "import"));
    bd.setValue("ignore", new String[] { schema.XSD_URI+"#annotation" });
    return bd;
  }
View Full Code Here

  /**
   * @see java.beans.BeanInfo#getBeanDescriptor()
   */
  public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(BEAN);
    bd.setName("minLength");
    bd.setDisplayName(XMLBean.concatName(schema.XSD_URI, "minLength"));
    bd.setValue("ignore", new String[] { schema.XSD_URI+"#annotation" });
    return bd;
  }
View Full Code Here

  /**
   * @see java.beans.BeanInfo#getBeanDescriptor()
   */
  public BeanDescriptor getBeanDescriptor() {
    BeanDescriptor bd = new BeanDescriptor(BEAN);
    bd.setName("complexContent");
    bd.setDisplayName(XMLBean.concatName(schema.XSD_URI, "complexContent"));
    bd.setValue("ignore", new String[] { schema.XSD_URI+"#annotation" });
        try {
          bd
            .setValue(
              "content",
              new DTDSequence(new XMLBean[] {
                new DTDElement(schema.XSD_URI, "annotation", "0", "1"),
                new DTDChoice(
View Full Code Here

    }

    /** {@inheritDoc} */
    public Collection<String> getMenuCategories() {
        List<String> menuCategories = new LinkedList<String>();
        BeanDescriptor bd = beanInfo.getBeanDescriptor();

        // We don't want to show expert beans in the menus unless we're
        // in expert mode:
        if (bd.isExpert() && !JMeterUtils.isExpertMode()) {
            return null;
        }

        int matches = 0; // How many classes can we assign from?
        // TODO: there must be a nicer way...
        if (Assertion.class.isAssignableFrom(testBeanClass)) {
            menuCategories.add(MenuFactory.ASSERTIONS);
            bd.setValue(TestElement.GUI_CLASS, AbstractAssertionGui.class.getName());
            matches++;
        }
        if (ConfigElement.class.isAssignableFrom(testBeanClass)) {
            menuCategories.add(MenuFactory.CONFIG_ELEMENTS);
            bd.setValue(TestElement.GUI_CLASS, AbstractConfigGui.class.getName());
            matches++;
        }
        if (Controller.class.isAssignableFrom(testBeanClass)) {
            menuCategories.add(MenuFactory.CONTROLLERS);
            bd.setValue(TestElement.GUI_CLASS, AbstractControllerGui.class.getName());
            matches++;
        }
        if (Visualizer.class.isAssignableFrom(testBeanClass)) {
            menuCategories.add(MenuFactory.LISTENERS);
            bd.setValue(TestElement.GUI_CLASS, AbstractVisualizer.class.getName());
            matches++;
        }
        if (PostProcessor.class.isAssignableFrom(testBeanClass)) {
            menuCategories.add(MenuFactory.POST_PROCESSORS);
            bd.setValue(TestElement.GUI_CLASS, AbstractPostProcessorGui.class.getName());
            matches++;
        }
        if (PreProcessor.class.isAssignableFrom(testBeanClass)) {
            matches++;
            menuCategories.add(MenuFactory.PRE_PROCESSORS);
            bd.setValue(TestElement.GUI_CLASS, AbstractPreProcessorGui.class.getName());
        }
        if (Sampler.class.isAssignableFrom(testBeanClass)) {
            matches++;
            menuCategories.add(MenuFactory.SAMPLERS);
            bd.setValue(TestElement.GUI_CLASS, AbstractSamplerGui.class.getName());
        }
        if (Timer.class.isAssignableFrom(testBeanClass)) {
            matches++;
            menuCategories.add(MenuFactory.TIMERS);
            bd.setValue(TestElement.GUI_CLASS, AbstractTimerGui.class.getName());
        }
        if (matches == 0) {
            log.error("Could not assign GUI class to " + testBeanClass.getName());
        } else if (matches > 1) {// may be impossible, but no harm in
                                    // checking ...
View Full Code Here

    public BeanInfo[] getAdditionalBeanInfo() {
        return new BeanInfo[0];
    }

    public BeanDescriptor getBeanDescriptor() {
        return new BeanDescriptor(getClass());
    }
View Full Code Here

   * Get the bean descriptor for this bean                                                     
   *                                                                                           
   * @return a <code>BeanDescriptor</code> value                                               
   */
  public BeanDescriptor getBeanDescriptor() {
    return new BeanDescriptor(weka.gui.beans.TimeSeriesForecasting.class,
                              TimeSeriesForecastingCustomizer.class);
  }
View Full Code Here

    public BeanInfo[] getAdditionalBeanInfo() {
        return new BeanInfo[0];
    }

    public BeanDescriptor getBeanDescriptor() {
        return new BeanDescriptor(getClass());
    }
View Full Code Here

TOP

Related Classes of java.beans.BeanDescriptor

Copyright © 2018 www.massapicom. 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.