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/FloatLiteralType.java')
-rw-r--r--jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/FloatLiteralType.java65
1 files changed, 0 insertions, 65 deletions
diff --git a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/FloatLiteralType.java b/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/FloatLiteralType.java
deleted file mode 100644
index 5631b8700..000000000
--- a/jsf/plugins/org.eclipse.jst.jsf.common/src/org/eclipse/jst/jsf/common/internal/types/FloatLiteralType.java
+++ /dev/null
@@ -1,65 +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 java.math.BigDecimal;
-import java.math.BigInteger;
-
-import org.eclipse.jdt.core.Signature;
-
-/**
- * Represents an FloatLiteral as defined by JSP.2.9
- * @author cbateman
- *
- */
-public class FloatLiteralType extends NumericTypeLiteral
-{
- private final double _literalValue;
-
- /**
- * @param literalValue
- */
- public FloatLiteralType(double literalValue)
- {
- // according to the notes to JSP.2.9, bullet 5, float literals are doubles
- super(Signature.SIG_DOUBLE);
- _literalValue = literalValue;
- }
-
- protected Number getBoxedValue()
- {
- return new Double(_literalValue);
- }
-
- public Number coerceToNumber(Class T) throws TypeCoercionException
- {
- if (T == BigInteger.class)
- {
- return new BigDecimal(_literalValue).toBigInteger();
- }
- else if (T == BigDecimal.class)
- {
- return new BigDecimal(_literalValue);
- }
-
- Number commonCoercion = super.coerceToNumber(T);
-
- if (commonCoercion == null)
- {
- throw new IllegalArgumentException("Not a target numeric type: "+T); //$NON-NLS-1$
- }
-
- return commonCoercion;
- }
-
-}

Back to the top