OSDN Git Service

必要のないクラスを削除し,クラスの整理を行った.
[stigmata/stigmata.git] / src / main / java / jp / sourceforge / stigmata / birthmarks / cvfv / ConstantValueOfFieldVariableBirthmarkService.java
index 7efa926..7d1dbf2 100644 (file)
@@ -1,24 +1,18 @@
 package jp.sourceforge.stigmata.birthmarks.cvfv;
 
-/*
- * $Id$
- */
-
 import jp.sourceforge.stigmata.BirthmarkComparator;
-import jp.sourceforge.stigmata.BirthmarkElement;
 import jp.sourceforge.stigmata.BirthmarkExtractor;
-import jp.sourceforge.stigmata.birthmarks.AbstractBirthmarkService;
+import jp.sourceforge.stigmata.BirthmarkPreprocessor;
 import jp.sourceforge.stigmata.birthmarks.comparators.PlainBirthmarkComparator;
-import jp.sourceforge.stigmata.spi.BirthmarkSpi;
+import jp.sourceforge.stigmata.spi.BirthmarkService;
 
 /**
  * 
  * 
  *
  * @author Haruaki TAMADA
- * @version $Revision$ 
  */
-public class ConstantValueOfFieldVariableBirthmarkService extends AbstractBirthmarkService implements BirthmarkSpi{
+public class ConstantValueOfFieldVariableBirthmarkService implements BirthmarkService{
        private BirthmarkComparator comparator = new PlainBirthmarkComparator(this);
     private BirthmarkExtractor extractor = new ConstantValueOfFieldVariableBirthmarkExtractor(this);
 
@@ -28,7 +22,7 @@ public class ConstantValueOfFieldVariableBirthmarkService extends AbstractBirthm
     }
 
     @Override
-    public String getDefaultDescription(){
+    public String getDescription(){
         return "Field type and its initial value.";
     }
 
@@ -53,30 +47,7 @@ public class ConstantValueOfFieldVariableBirthmarkService extends AbstractBirthm
     }
 
     @Override
-       public BirthmarkElement buildBirthmarkElement(String value) {
-       String signature = value.substring(0, value.indexOf('='));
-       String subValue = value.substring(value.indexOf('=') + 1);
-       Object elementValue = subValue;
-
-        if(subValue.equals("null")){
-            elementValue = null;
-        }
-        else{
-            switch(signature.charAt(0)){
-            case 'Z':{
-                if(value.equals("true")) elementValue = Boolean.TRUE;
-                else                     elementValue = Boolean.FALSE;
-                break;
-            }
-            case 'C': elementValue = new Character(subValue.charAt(0)); break;
-            case 'D': elementValue = new Double(subValue);  break;
-            case 'F': elementValue = new Float(subValue);   break;
-            case 'S': elementValue = new Short(subValue);   break;
-            case 'B': elementValue = new Byte(subValue);    break;
-            case 'I': elementValue = new Integer(subValue); break;
-            default:  elementValue = value; break;
-            }
-       }
-       return new TypeAndValueBirthmarkElement(signature, elementValue);
-       }
+    public BirthmarkPreprocessor getPreprocessor(){
+        return null;
+    }
 }