PDFFieldAction.java 1.07 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.internal.pdftoolkit.core.types.ASName
 */
package com.adobe.internal.pdftoolkit.pdf.digsig;

import com.adobe.internal.pdftoolkit.core.types.ASName;

/*
 * This class specifies class file version 49.0 but uses Java 6 signatures.  Assumed Java 6.
 */
public enum PDFFieldAction {
    All(ASName.k_All),
    Include(ASName.create((String)"Include")),
    Exclude(ASName.create((String)"Exclude"));
    
    private final ASName action;

    private PDFFieldAction(ASName action) {
        this.action = action;
    }

    public static final PDFFieldAction getInstance(ASName action) {
        if (action == All.getValue()) {
            return All;
        }
        if (action == Include.getValue()) {
            return Include;
        }
        if (action == Exclude.getValue()) {
            return Exclude;
        }
        return null;
    }

    public ASName getValue() {
        return this.action;
    }

    public String toString() {
        return this.action.asString(true);
    }
}