Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import org.xml.sax.Attributes;

public class Main {
    public static final String getAttributeOrThrow(final Attributes pAttributes, final String pAttributeName) {
        final String value = pAttributes.getValue("", pAttributeName);
        if (value != null) {
            return value;
        } else {
            throw new IllegalArgumentException("No value found for attribute: '" + pAttributeName + "'");
        }
    }
}