Examples of BeanUtility


Examples of org.jfree.report.util.beans.BeanUtility

      }
      try
      {
        final Class type = beanUtility.getPropertyType(name);
        final Object property = type.newInstance();
        final BeanUtility propertyUtility = new BeanUtility(property);
        return new TypedPropertyReadHandler
                (propertyUtility, expressionName, entityParser);
      }
      catch (BeanException e)
      {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

    }
    // the classic way, in case the expression does not provide any meta-data. This is
    // in the code for legacy reasons, as there are many expression implementations out there
    // that do not yet provide meta-data descriptions ..

    final BeanUtility beanUtility = new BeanUtility(preProcessor);
    final String[] propertyNames = beanUtility.getProperties();

    for (int i = 0; i < propertyNames.length; i++)
    {
      final String key = propertyNames[i];
      final Object property = beanUtility.getProperty(key);
      final Class propertyType = beanUtility.getPropertyType(key);
      final String value = beanUtility.getPropertyAsString(key);
      if (value != null && property != null)
      {
        final AttributeList attList = new AttributeList();
        attList.setAttribute(BundleNamespaces.LAYOUT, "name", key);
        if (BeanUtility.isSameType(propertyType, property.getClass()) == false)
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility bu = new BeanUtility(expression);
      final String[] propertyNames = bu.getProperties();
      if (propertyNames.length == 0)
      {
        final AttributeList properties = new AttributeList();
        if (expression.getName() != null)
        {
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      return;
    }

    try
    {
      final BeanUtility bu = new BeanUtility(expression);
      final String[] propertyNames = bu.getProperties();
      if (propertyNames.length == 0)
      {
        final AttributeList properties = new AttributeList();
        properties.setAttribute(ExtParserModule.NAMESPACE, "style-key", styleKey.getName());
        properties.setAttribute(ExtParserModule.NAMESPACE, "class", expression.getClass().getName());
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

    }

    try
    {
      this.expression = (Expression) expression;
      this.beanUtility = new BeanUtility(expression);
    }
    catch (IntrospectionException e)
    {
      throw new ParseException("Specified expression cannot be beaned");
    }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

    for (int i = 0; i < classes.length; i++)
    {
      final Class aClass = classes[i];

      final BeanInfo beanInfo = Introspector.getBeanInfo(aClass);
      final BeanUtility bu = new BeanUtility(aClass.newInstance());
      final PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
      for (int j = 0; j < descriptors.length; j++)
      {
        final PropertyDescriptor descriptor = descriptors[j];
        final String key = descriptor.getName();

        if ("runtime".equals(key))
        {
          continue;
        }
        if ("active".equals(key))
        {
          continue;
        }
        if ("preserve".equals(key))
        {
          continue;
        }

        if (descriptor.getReadMethod() == null)
        {
//          System.out.println("Skipping " + key + " from " + aClass + " No read method");
          continue;
        }
        if (descriptor.getWriteMethod() == null)
        {
//          System.out.println("Skipping " + key + " from " + aClass + " No write method");
          continue;
        }

        if (bu.getPropertyType(key) == null)
        {
          System.out.println("NOT Accepting " + key + " from " + aClass);
        }
        System.out.println("Accepting " + key + " from " + aClass);
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

        emd = null;
      }

      if (emd != null)
      {
        final BeanUtility bu = new BeanUtility(expression);
        final ExpressionPropertyMetaData[] expressionProperties = emd.getPropertyDescriptions();
        boolean propertiesOpen = false;
        for (int i = 0; i < expressionProperties.length; i++)
        {
          final ExpressionPropertyMetaData metaData = expressionProperties[i];
          final String propertyName = metaData.getName();
          if (isFilteredProperty(propertyName))
          {
            continue;
          }
          if (metaData.isComputed())
          {
            continue;
          }
          if (propertiesOpen == false)
          {
            writer.writeTag(namespaceUri, expressionTag, expressionAttrList, XmlWriterSupport.OPEN);
            writer.writeTag(namespaceUri, "properties", XmlWriterSupport.OPEN);// NON-NLS
            propertiesOpen = true;
          }

          copyStaticResources(bundle, state, expression, bu, expressionProperties);
          writeExpressionParameter(writer, bu, propertyName, namespaceUri);
        }

        if (propertiesOpen)
        {
          writer.writeCloseTag();
          writer.writeCloseTag();
        }
        else
        {
          writer.writeTag(namespaceUri, expressionTag, expressionAttrList, XmlWriterSupport.CLOSE);
        }
      }
      else
      {
        // the classic way, in case the expression does not provide any meta-data. This is
        // in the code for legacy reasons, as there are many expression implementations out there
        // that do not yet provide meta-data descriptions ..

        final BeanUtility beanUtility = new BeanUtility(expression);
        final String[] propertyNames = beanUtility.getProperties();

        for (int i = 0; i < propertyNames.length; i++)
        {
          final String key = propertyNames[i];
          // filter some of the standard properties. These are system-properties
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

                                         final String expressionClass)
      throws IntrospectionException
  {
    this.originalExpressionClass = originalExpressionClass;
    this.expressionClass = expressionClass;
    this.beanUtility = new BeanUtility(expression);
    this.expression = expression;
  }
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

          getLocator());
    }

    try
    {
      this.beanUtility = new BeanUtility(preProcessor);
    }
    catch (IntrospectionException e)
    {
      throw new ParseException("Failed to introspect the specified preprocessor '" + preprocessorClass + '\'',
          getLocator());
View Full Code Here

Examples of org.pentaho.reporting.engine.classic.core.util.beans.BeanUtility

      }

      this.expressionName = expression.getName();
      try
      {
        this.beanUtility = new BeanUtility(expression);
      }
      catch (IntrospectionException e)
      {
        // should not happen, but if it does, we simply ignore the bean-metadata.
      }
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.