Package java.beans

Examples of java.beans.BeanInfo


    return projection;
  }

  private Object getPropertyValue(Object object, String propertyName) {
    try {
      BeanInfo info = Introspector.getBeanInfo( object.getClass() );
      PropertyDescriptor[] properties = info.getPropertyDescriptors();
      for ( PropertyDescriptor property : properties ) {
        if ( property.getName().equals( propertyName ) ) {
          return property.getReadMethod().invoke( object );
        }
      }
View Full Code Here


      final E entity = createPersistentEntity(typeInformation);

      // Eagerly cache the entity as we might have to find it during recursive lookups.
      persistentEntities.put(typeInformation, entity);

      BeanInfo info = Introspector.getBeanInfo(type);

      final Map<String, PropertyDescriptor> descriptors = new HashMap<String, PropertyDescriptor>();
      for (PropertyDescriptor descriptor : info.getPropertyDescriptors()) {
        descriptors.put(descriptor.getName(), descriptor);
      }

      try {
View Full Code Here

      setToolBarVisible(false);
      setDescriptionVisible(true);

      if (pManagedObject != null) {

        BeanInfo beanInfo = managedObject.getBeanInfo();

        if (beanInfo != null)
          setBeanInfo(beanInfo);

        readFromObject(managedObject);
View Full Code Here

    }
    return null;
  }

  protected void applyPreset(Preset preset) {
    BeanInfo beanInfo = getBeanInfo();
    if (beanInfo != null) {
      PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
      if (props != null) {
        for (PropertyDescriptor prop : props) {
          Method writeMethod = prop.getWriteMethod();
          if (writeMethod != null) {
            Object val = null;
View Full Code Here

    return null;
  }

  @SuppressWarnings({ "unchecked", "rawtypes" })
  public void setProperties(ManagedObject pManagedObject, BufferList pBufferList) throws Exception {
    BeanInfo beanInfo = pManagedObject.getBeanInfo();
    if (beanInfo != null) {
      PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
      if (props != null) {
        for (PropertyDescriptor prop : props) {
          Method writeMethod = prop.getWriteMethod();
          if (writeMethod != null) {
            Object val = null;
View Full Code Here

      }
    }
  }

  public void importProperties(ManagedObject pManagedObject) {
    BeanInfo beanInfo = pManagedObject.getBeanInfo();
    if (beanInfo != null) {
      PropertyDescriptor[] props = beanInfo.getPropertyDescriptors();
      if (props != null) {
        for (PropertyDescriptor prop : props) {
          Method readMethod = prop.getReadMethod();
          if (readMethod != null) {
            try {
View Full Code Here

        List<PropertyDescriptor> params = new ArrayList<PropertyDescriptor>();

        try {

            BeanInfo info = Introspector.getBeanInfo(formType);
            for (PropertyDescriptor propertyDescriptor : info.getPropertyDescriptors()) {
                if (!propertyDescriptor.getName().equals("class")) {
                    params.add(propertyDescriptor);
                }
            }
View Full Code Here

            this.tagHandlerClass = tagHandlerClass;
            this.methodMaps = new Hashtable();
            this.propertyEditorMaps = new Hashtable();

            try {
                BeanInfo tagClassInfo = Introspector
                        .getBeanInfo(tagHandlerClass);
                PropertyDescriptor[] pd = tagClassInfo.getPropertyDescriptors();
                for (int i = 0; i < pd.length; i++) {
                    /*
                     * FIXME: should probably be checking for things like
                     * pageContext, bodyContent, and parent here -akv
                     */
 
View Full Code Here

        }

        PropertyDescriptor[] descriptors = null;

        try {
            BeanInfo beanInfo = Introspector.getBeanInfo(bean.getClass());

            descriptors = beanInfo.getPropertyDescriptors();
        } catch (IntrospectionException e) {
            LOGGER.error(e.getMessage(), e);
        }

        if (descriptors == null) {
View Full Code Here

     * specified object.
     */
    public static Object randomizeBean(Object bean)
        throws IntrospectionException, IllegalAccessException,
        InvocationTargetException {
        BeanInfo info = Introspector.getBeanInfo(bean.getClass());
        PropertyDescriptor [] props = info.getPropertyDescriptors();
        for (int i = 0; i < props.length; i++) {
            Method write = props[i].getWriteMethod();
            if (write == null)
                continue;

View Full Code Here

TOP

Related Classes of java.beans.BeanInfo

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.