public static Object getAnnotatedStyleableValue( Object obj, String key )
		throws IllegalArgumentException
	{
		String fieldName = keyToFieldName( key );
		Class<?> cls = obj.getClass();

		for(;;) {
			try {
				// find field annotated with 'Styleable'
				Field f = cls.getDeclaredField( fieldName );
				Styleable styleable = f.getAnnotation( Styleable.class );
				if( styleable != null ) {
					if( styleable.dot() != (fieldName != key) )
						throw new IllegalArgumentException( "'Styleable.dot' on field '" + fieldName + "' does not match key '" + key + "'" );
					if( styleable.type() != Void.class )
						throw new IllegalArgumentException( "'Styleable.type' on field '" + fieldName + "' not supported" );

					return getFieldValue( f, obj, false );
				}
			} catch( NoSuchFieldException ex ) {
				// field not found in class --> try superclass
			}

			// find field specified in 'StyleableField' annotation
			for( StyleableField styleableField : cls.getAnnotationsByType( StyleableField.class ) ) {
				if( key.equals( styleableField.key() ) )
					return getFieldValue( getStyleableField( styleableField ), obj, true );
			}

			cls = cls.getSuperclass();
			if( cls == null )
				return null;

			String superclassName = cls.getName();
			if( superclassName.startsWith( "java." ) || superclassName.startsWith( "javax." ) )
				return null;
		}
	}
Search for all fields annotated with {@link Styleable} and add them to the given map.
The key is the name of the field and the value the type of the field.
flatlaf-core/src/main/java/com/formdev/flatlaf/ui/FlatStylingSupport.java