private Map getDeviceProperties()

in aws-iot-device-sdk-java/src/main/java/com/amazonaws/services/iot/client/shadow/AbstractAwsIotDevice.java [296:312]


    private Map<String, Field> getDeviceProperties(boolean enableReport, boolean allowUpdate) {
        Map<String, Field> properties = new HashMap<>();

        for (Field field : this.getClass().getDeclaredFields()) {
            AWSIotDeviceProperty annotation = field.getAnnotation(AWSIotDeviceProperty.class);
            if (annotation == null) {
                continue;
            }

            String propertyName = annotation.name().length() > 0 ? annotation.name() : field.getName();
            if ((enableReport && annotation.enableReport()) || (allowUpdate && annotation.allowUpdate())) {
                properties.put(propertyName, field);
            }
        }

        return properties;
    }