summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahaase2008-02-20 17:19:27 (EST)
committer ahaase2008-02-20 17:19:27 (EST)
commitabbc2b46ebf98e5b6da9ca2975034e38aefb1bb8 (patch)
treee5858653ab01c192bf21eae8b88477e2a365dd42
parent4d740609071e0c995cc9cf5183aa9ce54a9fbc2e (diff)
downloadorg.eclipse.xpand-abbc2b46ebf98e5b6da9ca2975034e38aefb1bb8.zip
org.eclipse.xpand-abbc2b46ebf98e5b6da9ca2975034e38aefb1bb8.tar.gz
org.eclipse.xpand-abbc2b46ebf98e5b6da9ca2975034e38aefb1bb8.tar.bz2
cleaned up the code
-rw-r--r--plugins/org.eclipse.xtend.backend/META-INF/MANIFEST.MF5
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java1
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java5
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java1
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java1
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java5
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java1
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/MapType.java5
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java1
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java5
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java1
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java1
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java4
-rw-r--r--plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java1
14 files changed, 12 insertions, 25 deletions
diff --git a/plugins/org.eclipse.xtend.backend/META-INF/MANIFEST.MF b/plugins/org.eclipse.xtend.backend/META-INF/MANIFEST.MF
index d259f77..9efc16c 100644
--- a/plugins/org.eclipse.xtend.backend/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.xtend.backend/META-INF/MANIFEST.MF
@@ -10,8 +10,11 @@ Export-Package: org.eclipse.xtend.backend;uses:="org.eclipse.xtend.backend.commo
org.eclipse.xtend.backend.functions.internal;x-friends:="org.eclipse.xtend.backend.test",
org.eclipse.xtend.backend.functions.java;uses:="org.eclipse.xtend.backend.iface,org.eclipse.xtend.backend.common",
org.eclipse.xtend.backend.functions.java.internal;x-friends:="org.eclipse.xtend.backend.test",
+ org.eclipse.xtend.backend.internal;x-internal:=true,
org.eclipse.xtend.backend.syslib,
org.eclipse.xtend.backend.types;uses:="org.eclipse.xtend.backend.common",
org.eclipse.xtend.backend.types.builtin;uses:="org.eclipse.xtend.backend.common,org.eclipse.xtend.backend.types",
+ org.eclipse.xtend.backend.types.java.internal;x-internal:=true,
org.eclipse.xtend.backend.util
-Require-Bundle: org.apache.commons.logging
+Require-Bundle: org.apache.commons.logging,
+ org.eclipse.emf.ecore
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java
index 43c3e56..4902db9 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/BooleanType.java
@@ -23,6 +23,7 @@ public final class BooleanType extends AbstractType {
private BooleanType () {super ("boolean");}
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this || other == VoidType.INSTANCE;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java
index 095a86a..4274aad 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/CollectionType.java
@@ -12,7 +12,6 @@ package org.eclipse.xtend.backend.types.builtin;
import java.util.Collection;
-import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.types.AbstractType;
import org.eclipse.xtend.backend.util.ReflectionHelper;
@@ -30,9 +29,5 @@ public final class CollectionType extends AbstractType {
register (new BuiltinProperty (this, LongType.INSTANCE, "size", ReflectionHelper.getKnownMethod(Collection.class, "size"), null));
register (new BuiltinProperty (this, BooleanType.INSTANCE, "isEmpty", ReflectionHelper.getKnownMethod(Collection.class, "isEmpty"), null));
}
-
- public boolean isAssignableFrom (BackendType other) {
- return other == this || other == ListType.INSTANCE || other == SetType.INSTANCE || other == VoidType.INSTANCE;
- }
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java
index 3e033dd..8378214 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/DoubleType.java
@@ -23,6 +23,7 @@ public final class DoubleType extends AbstractType {
private DoubleType () {super ("Double"); }
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this || other == VoidType.INSTANCE;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java
index fca4031..acb4c4a 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/FunctionType.java
@@ -49,6 +49,7 @@ public final class FunctionType extends AbstractType {
});
}
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this || other == VoidType.INSTANCE;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java
index 9be1015..d862beb 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/ListType.java
@@ -12,7 +12,6 @@ package org.eclipse.xtend.backend.types.builtin;
import java.util.ArrayList;
-import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.types.AbstractType;
@@ -29,8 +28,4 @@ public final class ListType extends AbstractType {
public Object create() {
return new ArrayList<Object>();
}
-
- public boolean isAssignableFrom(BackendType other) {
- return other == this || other == VoidType.INSTANCE;
- }
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java
index 6b0021f..a20702b 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/LongType.java
@@ -23,6 +23,7 @@ public final class LongType extends AbstractType {
private LongType () {super ("Long"); }
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this || other == VoidType.INSTANCE;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/MapType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/MapType.java
index d563498..e778139 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/MapType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/MapType.java
@@ -13,7 +13,6 @@ package org.eclipse.xtend.backend.types.builtin;
import java.util.Collection;
import java.util.HashMap;
-import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.types.AbstractType;
import org.eclipse.xtend.backend.util.ReflectionHelper;
@@ -36,8 +35,4 @@ public final class MapType extends AbstractType {
public Object create() {
return new HashMap <Object,Object> ();
}
-
- public boolean isAssignableFrom (BackendType other) {
- return other == this || other == VoidType.INSTANCE;
- }
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java
index b6258db..289adbd 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/PropertyType.java
@@ -31,6 +31,7 @@ public final class PropertyType extends AbstractType {
register (new BuiltinProperty (this, TypeType.INSTANCE, "owner", ReflectionHelper.getKnownMethod(Property.class, "getOwner"), null));
}
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this || other == VoidType.INSTANCE;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java
index 71f65da..6465b2e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/SetType.java
@@ -12,7 +12,6 @@ package org.eclipse.xtend.backend.types.builtin;
import java.util.HashSet;
-import org.eclipse.xtend.backend.common.BackendType;
import org.eclipse.xtend.backend.types.AbstractType;
@@ -31,8 +30,4 @@ public final class SetType extends AbstractType {
public Object create() {
return new HashSet<Object>();
}
-
- public boolean isAssignableFrom(BackendType other) {
- return other == this || other == VoidType.INSTANCE;
- }
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java
index 34c232a..9c6a91e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StaticPropertyType.java
@@ -31,6 +31,7 @@ public final class StaticPropertyType extends AbstractType {
register (new BuiltinProperty (this, TypeType.INSTANCE, "owner", ReflectionHelper.getKnownMethod(Property.class, "getOwner"), null));
}
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this || other == VoidType.INSTANCE;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java
index b3234df..55911a5 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/StringType.java
@@ -34,6 +34,7 @@ public final class StringType extends AbstractType {
register (new BuiltinProperty (this, this, "length", ReflectionHelper.getKnownMethod (CharSequence.class, "length"), null));
}
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this || other == VoidType.INSTANCE;
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java
index 7d7ddaa..d2d4385 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/TypeType.java
@@ -73,10 +73,6 @@ public final class TypeType extends AbstractType {
}
});
}
-
- public boolean isAssignableFrom (BackendType other) {
- return other == this || other == VoidType.INSTANCE;
- }
}
diff --git a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java
index 135ead4..82ffc8e 100644
--- a/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java
+++ b/plugins/org.eclipse.xtend.backend/src/org/eclipse/xtend/backend/types/builtin/VoidType.java
@@ -25,6 +25,7 @@ public final class VoidType extends AbstractType {
private VoidType () {super ("Void"); }
+ @Override
public boolean isAssignableFrom (BackendType other) {
return other == this;
}