Examples of BeanInfo


Examples of java.beans.BeanInfo

    commonCtor();
    if (bean != null)
    {
      try
      {
        BeanInfo info = Introspector.getBeanInfo(bean.getClass(),
                        Introspector.USE_ALL_BEANINFO);
        processBeanInfo(bean, info);
      }
      catch (Exception ex)
      {
View Full Code Here

Examples of java.beans.BeanInfo

      beans = new Object[0];
    }

    if (beans.length > 0)
    {
      BeanInfo info = null;
      try
      {
        info = Introspector.getBeanInfo(beans[0].getClass(), Introspector.USE_ALL_BEANINFO);
        validateBeans(beans);
        initialize(info);
View Full Code Here

Examples of java.beans.BeanInfo

  return tmpls;
    }

    @Override
    public FieldEntry[] toFieldEntries(Class<?> targetClass, FieldOption implicitOption) {
  BeanInfo desc;
  try {
      desc = Introspector.getBeanInfo(targetClass);
  } catch (IntrospectionException e1) {
      throw new TemplateBuildException("Class must be java beans class:" + targetClass.getName());
  }

  PropertyDescriptor[] props = desc.getPropertyDescriptors();
  ArrayList<PropertyDescriptor> list = new ArrayList<PropertyDescriptor>();
  for (int i = 0; i < props.length; i++) {
      PropertyDescriptor pd = props[i];
      if (!isIgnoreProperty(pd)) {
    list.add(pd);
View Full Code Here

Examples of java.beans.BeanInfo

 
  /**
   * @see net.sf.jasperreports.engine.JRDataSourceProvider#getFields(net.sf.jasperreports.engine.JasperReport)
   */
  public JRField[] getFields(JasperReport report) throws JRException {
    BeanInfo beanInfo = null;

    try {
      beanInfo = Introspector.getBeanInfo(beanClass);
    } catch (IntrospectionException e) {
      throw new JRException(e);
    }

    PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
    if(descriptors != null)
    {
      ArrayList fields = new ArrayList(descriptors.length);
     
      for (int i = 0; i < descriptors.length; i++) {
View Full Code Here

Examples of java.beans.BeanInfo

  protected final Representation getRepresentation(RDFWriterFactory factory, MediaType mediaType)
    throws ResourceException
  {
    try {
      BeanInfo info = Introspector.getBeanInfo(RepositoryMetaData.class);
      PropertyDescriptor[] properties = info.getPropertyDescriptors();

      Repository repository = getRepository();
      RepositoryMetaData data = repository.getMetaData();
      URIFactory uf = repository.getURIFactory();
      LiteralFactory lf = repository.getLiteralFactory();
View Full Code Here

Examples of java.beans.BeanInfo

  public BeanMetaData(Class beanClass) {
    this.beanClass = beanClass;

    if (beanClass != null) {
      try {
        BeanInfo beanInfo = Introspector.getBeanInfo(beanClass);
        propertyDescriptors = beanInfo.getPropertyDescriptors();
      } catch (IntrospectionException e) {
        handleException(e);
      }
    }
View Full Code Here

Examples of java.beans.BeanInfo

   private Map<String, PropertyDescriptor> getPropertyDescriptors(
           Class<? extends Object> clazz)
   {
      try
      {
         BeanInfo beanInfo = Introspector.getBeanInfo(clazz);
         HashMap<String, PropertyDescriptor> results = new HashMap<String, PropertyDescriptor>();
         PropertyDescriptor[] propertyDescriptors = beanInfo
                 .getPropertyDescriptors();
         for (PropertyDescriptor propertyDescriptor : propertyDescriptors)
         {
            results.put(propertyDescriptor.getName(), propertyDescriptor);
         }
View Full Code Here

Examples of java.beans.BeanInfo

   * Get map with property descriptors for the specified bean class
   */
  private static Map getPropertyDescriptors(Class clazz) {
    HashMap map = (HashMap)descriptorCache.get(clazz);
    if (map == null) {
      BeanInfo beanInfo = null;
      try {
        beanInfo = Introspector.getBeanInfo(clazz);
      } catch (IntrospectionException e) {
        return Collections.EMPTY_MAP;
      }
      PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
      if (descriptors == null)
         descriptors = new PropertyDescriptor[0];
      map = new HashMap(descriptors.length);
      for (int i = 0; i < descriptors.length; i++)
        map.put(descriptors[i].getName(), descriptors[i]);
View Full Code Here

Examples of java.beans.BeanInfo

    {
      PDF annotation;
      {
        if(feature instanceof String) // Property name.
        {
          BeanInfo classInfo;
          try
          {classInfo = Introspector.getBeanInfo(getClass());}
          catch(IntrospectionException e)
          {throw new RuntimeException(e);}
          for(PropertyDescriptor property : classInfo.getPropertyDescriptors())
          {
            if(feature.equals(property.getName()))
            {
              feature = property.getReadMethod();
              break;
View Full Code Here

Examples of java.beans.BeanInfo

    private final Method dynaSetter;
    private final Map propertySetters = new HashMap();
   
    protected JspTagModelBase(Class tagClass) throws IntrospectionException {
        this.tagClass = tagClass;
        BeanInfo bi = Introspector.getBeanInfo(tagClass);
        PropertyDescriptor[] pda = bi.getPropertyDescriptors();
        for (int i = 0; i < pda.length; i++) {
            PropertyDescriptor pd = pda[i];
            Method m = pd.getWriteMethod();
            if(m != null) {
                propertySetters.put(pd.getName(), m);
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.