Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/StringExpressionConverter.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/StringExpressionConverter.java56
1 files changed, 0 insertions, 56 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/StringExpressionConverter.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/StringExpressionConverter.java
deleted file mode 100644
index 444650f53e..0000000000
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/jdtutility/StringExpressionConverter.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle. 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:
- * Oracle - initial API and implementation
- ******************************************************************************/
-package org.eclipse.jpt.core.internal.jdtutility;
-
-import org.eclipse.jdt.core.dom.AST;
-import org.eclipse.jdt.core.dom.ASTNode;
-import org.eclipse.jdt.core.dom.StringLiteral;
-
-/**
- * Convert a string literal to/from a string (e.g. "text").
- */
-public final class StringExpressionConverter
- extends AbstractExpressionConverter<String, StringLiteral>
-{
- private static ExpressionConverter<String, StringLiteral> INSTANCE;
-
- /**
- * Return the singleton.
- */
- public static ExpressionConverter<String, StringLiteral> instance() {
- if (INSTANCE == null) {
- INSTANCE = new StringExpressionConverter();
- }
- return INSTANCE;
- }
-
- /**
- * Ensure single instance.
- */
- private StringExpressionConverter() {
- super();
- }
-
- @Override
- protected StringLiteral convert_(String string, AST ast) {
- StringLiteral stringLiteral = ast.newStringLiteral();
- stringLiteral.setLiteralValue(string);
- return stringLiteral;
- }
-
- @Override
- protected String convert_(StringLiteral stringLiteral) {
- return (stringLiteral.getNodeType() == ASTNode.STRING_LITERAL) ?
- stringLiteral.getLiteralValue()
- :
- null;
- }
-
-}

Back to the top