protected void lookupGetters(final Map<String, Property> properties, final MethodHolder<?> clazz)
   {
      // Hack until https://issues.jboss.org/browse/FORGE-368

      for (Method<?, ?> method : clazz.getMethods())
      {
         // Exclude static methods

         if (method.isStatic())
         {
            continue;
         }

         // Exclude non-public methods. Section 8.3.1 of the JavaBean specification requires that getters be public.
         if (!method.isPublic())
         {
            continue;
         }

         // Get type

         if (!method.getParameters().isEmpty())
         {
            continue;
         }

         String returnType = method.getReturnType() != null ? method.getReturnType().getQualifiedName() : null;

         if (returnType == null)
         {
            continue;
         }

         // Get name

         String propertyName = isGetter(method);

         if (propertyName == null)
         {
            continue;
         }

         Field<?> privateField = getPrivateField((FieldHolder<?>) clazz, propertyName);

         if (privateField != null && this.privateFieldConvention == null)
         {
            propertyName = privateField.getName();
         }

         properties
                  .put(propertyName,
                           new ForgeProperty(propertyName, returnType, method, null, privateField, this.project));
      }
   }
protected void lookupGetters ( final Map < String , Property > properties , final MethodHolder < ? > clazz ) { for ( Method < ? , ? > method : clazz . getMethods ( ) ) { if ( method . isStatic ( ) ) { continue ; } if ( ! method . isPublic ( ) ) { continue ; } if ( ! method . getParameters ( ) . isEmpty ( ) ) { continue ; } String returnType = method . getReturnType ( ) != null ? method . getReturnType ( ) . getQualifiedName ( ) : null ; if ( returnType == null ) { continue ; } String propertyName = isGetter ( method ) ; if ( propertyName == null ) { continue ; } Field < ? > privateField = getPrivateField ( ( FieldHolder < ? > ) clazz , propertyName ) ; if ( privateField != null && this . privateFieldConvention == null ) { propertyName = privateField . getName ( ) ; } properties . put ( propertyName , new ForgeProperty ( propertyName , returnType , method , null , privateField , this . project ) ) ; } }
Lookup getter-based properties.
<p>
This method will be called after <code>lookupFields</code> but before <code>lookupSetters</code>.