Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/BooleanLiteralType.java')
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/BooleanLiteralType.java76
1 files changed, 0 insertions, 76 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/BooleanLiteralType.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/BooleanLiteralType.java
deleted file mode 100644
index 6055e5f50..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/BooleanLiteralType.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006 Oracle Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Cameron Bateman/Oracle - initial API and implementation
- *
- ********************************************************************************/
-
-package org.eclipse.jst.jsf.common.internal.types;
-
-import org.eclipse.jdt.core.Signature;
-
-/**
- * Represents a BooleanLiteral as defined by JSP.2.9
- *
- * @author cbateman
- *
- */
-public class BooleanLiteralType extends LiteralType
-{
- /**
- * The literal FALSE singleton
- */
- public final static BooleanLiteralType FALSE = new BooleanLiteralType(false);
- /**
- * The literal TRUE singleton
- */
- public final static BooleanLiteralType TRUE = new BooleanLiteralType(true);
-
- private final boolean _literalValue;
-
-
- /**
- * @param value
- * @return a constant boolean literal type corresponding to value
- */
- public static BooleanLiteralType valueOf(boolean value)
- {
- return value ? TRUE : FALSE;
- }
-
- /**
- * @param literalValue
- */
- /*package*/BooleanLiteralType(boolean literalValue)
- {
- super(Signature.SIG_BOOLEAN);
- _literalValue = literalValue;
- }
-
- public Number coerceToNumber(Class T) throws TypeCoercionException
- {
- // illegal to coerce boolean to number per JSP.2.8.3 step 3
- throw new TypeCoercionException("Cannot coerce boolean to number"); //$NON-NLS-1$
- }
-
- public String getLiteralValue()
- {
- return Boolean.toString(_literalValue);
- }
-
- public Object getLiteralValueRaw()
- {
- return Boolean.valueOf(_literalValue);
- }
-
- public Boolean coerceToBoolean() throws TypeCoercionException
- {
- return Boolean.valueOf(_literalValue);
- }
-
-}

Back to the top