protected void firePropertyChange()

in src/main/java/org/apache/commons/compress/harmony/pack200/Pack200PackerAdapter.java [38:72]


    protected void firePropertyChange(final String propertyName, final Object oldValue, final Object newValue) throws IOException {
        super.firePropertyChange(propertyName, oldValue, newValue);
        if (newValue != null && !newValue.equals(oldValue)) {
            if (propertyName.startsWith(CLASS_ATTRIBUTE_PFX)) {
                final String attributeName = propertyName.substring(CLASS_ATTRIBUTE_PFX.length());
                options.addClassAttributeAction(attributeName, (String) newValue);
            } else if (propertyName.startsWith(CODE_ATTRIBUTE_PFX)) {
                final String attributeName = propertyName.substring(CODE_ATTRIBUTE_PFX.length());
                options.addCodeAttributeAction(attributeName, (String) newValue);
            } else if (propertyName.equals(DEFLATE_HINT)) {
                options.setDeflateHint((String) newValue);
            } else if (propertyName.equals(EFFORT)) {
                options.setEffort(ParsingUtils.parseIntValue((String) newValue));
            } else if (propertyName.startsWith(FIELD_ATTRIBUTE_PFX)) {
                final String attributeName = propertyName.substring(FIELD_ATTRIBUTE_PFX.length());
                options.addFieldAttributeAction(attributeName, (String) newValue);
            } else if (propertyName.equals(KEEP_FILE_ORDER)) {
                options.setKeepFileOrder(Boolean.parseBoolean((String) newValue));
            } else if (propertyName.startsWith(METHOD_ATTRIBUTE_PFX)) {
                final String attributeName = propertyName.substring(METHOD_ATTRIBUTE_PFX.length());
                options.addMethodAttributeAction(attributeName, (String) newValue);
            } else if (propertyName.equals(MODIFICATION_TIME)) {
                options.setModificationTime((String) newValue);
            } else if (propertyName.startsWith(PASS_FILE_PFX)) {
                if (oldValue != null && !oldValue.equals("")) {
                    options.removePassFile((String) oldValue);
                }
                options.addPassFile((String) newValue);
            } else if (propertyName.equals(SEGMENT_LIMIT)) {
                options.setSegmentLimit(ParsingUtils.parseLongValue((String) newValue));
            } else if (propertyName.equals(UNKNOWN_ATTRIBUTE)) {
                options.setUnknownAttributeAction((String) newValue);
            }
        }
    }