Example usage for java.beans BeanDescriptor isExpert

List of usage examples for java.beans BeanDescriptor isExpert

Introduction

In this page you can find the example usage for java.beans BeanDescriptor isExpert.

Prototype

public boolean isExpert() 

Source Link

Document

The "expert" flag is used to distinguish between those features that are intended for expert users from those that are intended for normal users.

Usage

From source file:org.apache.jmeter.testbeans.gui.TestBeanGUI.java

/** {@inheritDoc} */
@Override/* www .j  a  va 2 s  .com*/
public Collection<String> getMenuCategories() {
    List<String> menuCategories = new LinkedList<>();
    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 = setupGuiClasses(menuCategories);
    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 ...
        log.error("More than 1 GUI class found for " + testBeanClass.getName());
    }
    return menuCategories;
}