forked from eclipse-epsilon/epsilon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support EolNativeType and refactor isCompatible
- Loading branch information
1 parent
1f7fba6
commit 5d20017
Showing
8 changed files
with
114 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...on.eol.staticanalyser/src/org/eclipse/epsilon/eol/staticanalyser/types/EolNativeType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.eclipse.epsilon.eol.staticanalyser.types; | ||
|
||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
public class EolNativeType extends EolType { | ||
|
||
private Class<?> javaClass; | ||
|
||
public EolNativeType(Class<?> javaClass) { | ||
this.javaClass = javaClass; | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Native"; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Native<" + javaClass.getName() +">"; | ||
} | ||
|
||
@Override | ||
public List<EolType> getParentTypes() { | ||
if (javaClass == Object.class) { | ||
return Collections.emptyList(); | ||
}else { | ||
return Arrays.asList(new EolNativeType(javaClass.getSuperclass())); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...sts/src/org/eclipse/epsilon/eol/staticanalyser/tests/scripts/RealOperationContributor.eol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/*Native<java.lang.Number>*/1.1.abs(); |