HttpMethodSpec.java revision ada1678a4262b208a7b87391f520a7767d25287c
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* or packager/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at packager/legal/LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
/**
* This class is used ...
* <P>
*
* @author Ron Monzillo
* @author Gary Ellison
*/
final class HttpMethodSpec {
private static final char exclaimationPointChar = '!';
private static Object methodKeys[] =
{ "DELETE",
"GET",
"HEAD",
"OPTIONS",
"POST",
"PUT",
"TRACE"
};
static {
int b = 1;
for (int i=0; i<mapSize; i++) {
b = b << 1;
}
};
private static int allSet;
static {
allSet = 0;
for (int i=0; i<mapSize; i++) {
allSet += 1;
}
}
private static HttpMethodSpec specArray[] =
static {
specArray[i] = new HttpMethodSpec(false,i);
}
}
private static HttpMethodSpec exceptionSpecArray[] =
static {
exceptionSpecArray[i] = new HttpMethodSpec(true,i);
}
}
boolean exceptionList;
int standardMap;
{
} else {
}
}
return rvalue;
}
{
} else {
int map = 0;
} else {
}
}
} else {
}
}
return rvalue;
}
return getActions();
}
{
return null;
}
synchronized(this) {
return actions;
}
if (standardSpec != null) {
} else {
}
}
return actions;
}
public int hashCode()
{
}
{
boolean rvalue = false;
if (that == this) {
rvalue = true;
} else {
}
}
return rvalue;
}
{
boolean rvalue;
// null actions implies everything
rvalue = true;
}
// only the null actions can implie the null actions
rvalue = false;
}
// both are an HttpMethodExceptionList
if (rvalue) {
if (this.extensionSet != null) {
rvalue = false;
} else {
}
}
}
}
// neither is an HttpMethodExceptionList
if (rvalue) {
if (this.extensionSet == null) {
rvalue = false;
} else {
}
}
}
}
// one or the other is an HttpMethodExceptionList
else if (this.exceptionList) {
if (rvalue) {
if (this.extensionSet == null) {
rvalue = true;
} else {
(that.extensionSet) ? false : true;
}
}
}
}
// an explicit list can never imply an exception list
else {
rvalue = false;
}
return rvalue;
}
// beginning of private methods
{
standardSpec = null;
standardMap = map;
extensionSet = null;
}
{
standardSpec = spec;
}
int bitPos;
synchronized (extensionMethods) {
if (bitPos < 0) {
// *** should ensure method is syntactically legal
}
}
}
{
synchronized (extensionMethods) {
} else {
throw new RuntimeException
("invalid (extensionMethods) bit position: '" + bitPos +
}
}
}
{
boolean isExceptionList = false;
isExceptionList = true;
throw new IllegalArgumentException
}
}
if (isExceptionList) {
} else {
}
return rvalue;
}
{
int i = 0;
int mSet = 0;
int commaPos = 0;
if (commaPos != 0) {
if (commaPos < 0) {
} else {
}
} else {
}
i = commaPos + 1;
}
else {
throw new IllegalArgumentException
}
}
return mSet;
}
{
}
}
} else {
(standardActions == null ?
}
}
}
return rvalue;
}
{
int bitValue = 1;
for (int i=0; i<mapSize; i++) {
actBuf = new StringBuffer
} else {
}
}
}
} else {
}
}
}