Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.as.connector.subsystems.jca;
 
 import java.util.Map;

A Attribute.

Author(s):
Stefano Maestri
 
public enum Attribute {
    
always the first
    UNKNOWN(null),
    ENABLED("enabled"),
    
fail-on-error attribute
    FAIL_ON_ERROR("fail-on-error"),

    
fail-on-warn attribute
    FAIL_ON_WARN("fail-on-warn"),
    SHORT_RUNNING_THREAD_POOL("short-running-thread-pool"),
    LONG_RUNNING_THREAD_POOL("long-running-thread-pool"),
    DEBUG("debug"),
    ERROR("error"),
    NAME("name"),
    WORKMANAGER("workmanager");
    private final String name;
    Attribute(final String name) {
        this. = name;
    }

    
Get the local name of this element.

Returns:
the local name
    public String getLocalName() {
        return ;
    }
    private static final Map<StringAttributeMAP;
    static {
        final Map<StringAttributemap = new HashMap<StringAttribute>();
        for (Attribute element : values()) {
            final String name = element.getLocalName();
            if (name != null)
                map.put(nameelement);
        }
         = map;
    }
    public static Attribute forName(String localName) {
        final Attribute element = .get(localName);
        return element == null ?  : element;
    }
    @Override
    public String toString() {
        return getLocalName();
    }
New to GrepCode? Check out our FAQ X