Skip to content

Commit

Permalink
add some SharedAnnotations
Browse files Browse the repository at this point in the history
  • Loading branch information
gavinking committed Feb 1, 2014
1 parent b15cf69 commit 70a575d
Show file tree
Hide file tree
Showing 30 changed files with 46 additions and 9 deletions.
1 change: 1 addition & 0 deletions runtime/ceylon/language/Array.java
Expand Up @@ -27,6 +27,7 @@
"ceylon.language::List<Element>",
"ceylon.language::Ranged<ceylon.language::Integer,ceylon.language::Array<Element>>"
})
@ceylon.language.SharedAnnotation$annotation$
public final class Array<Element>
implements List<Element>, ReifiedType {

Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/ArraySequence.java
Expand Up @@ -20,6 +20,7 @@
@Class(extendsType="ceylon.language::Object")
@SatisfiedTypes("ceylon.language::Sequence<Element>")
@TypeParameters(@TypeParameter(value = "Element"))
@ceylon.language.SharedAnnotation$annotation$
public class ArraySequence<Element> implements Sequence<Element>, ReifiedType {

// The array length is the first element in the array
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/Boolean.java
Expand Up @@ -12,6 +12,7 @@
@Class
@CaseTypes({"ceylon.language::true", "ceylon.language::false"})
@ValueType
@ceylon.language.SharedAnnotation$annotation$
public abstract class Boolean implements ReifiedType {

@Ignore
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/Callable.java
Expand Up @@ -11,6 +11,7 @@
@TypeParameter(value="Return", variance=Variance.OUT),
@TypeParameter(value="CallableArgument", satisfies="ceylon.language::Sequential<ceylon.language::Anything>", variance=Variance.IN)
})
@ceylon.language.SharedAnnotation$annotation$
public interface Callable<Return> {

/**
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/Character.java
Expand Up @@ -16,6 +16,7 @@
@SatisfiedTypes({"ceylon.language::Comparable<ceylon.language::Character>",
"ceylon.language::Enumerable<ceylon.language::Character>"})
@ValueType
@ceylon.language.SharedAnnotation$annotation$
public final class Character
implements Comparable<Character>, Enumerable<Character>, ReifiedType {

Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/Exception.java
Expand Up @@ -11,6 +11,7 @@

@Ceylon(major = 6)
@Class(extendsType = "ceylon.language::Basic")
@ceylon.language.SharedAnnotation$annotation$
public class Exception extends RuntimeException implements ReifiedType {

@Ignore
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/Float.java
Expand Up @@ -18,6 +18,7 @@
"ceylon.language::Exponentiable<ceylon.language::Float,ceylon.language::Float>"
})
@ValueType
@ceylon.language.SharedAnnotation$annotation$
public final class Float
implements Scalar<Float>, Exponentiable<Float,Float>, ReifiedType {

Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/Integer.java
Expand Up @@ -21,6 +21,7 @@
})
@Class(extendsType="ceylon.language::Object")
@ValueType
@ceylon.language.SharedAnnotation$annotation$
public final class Integer
implements Scalar<Integer>, Integral<Integer>,
Binary<Integer>,
Expand Down
4 changes: 3 additions & 1 deletion runtime/ceylon/language/SequenceAppender.java
Expand Up @@ -12,7 +12,9 @@
@Ceylon(major = 6)
@Class(extendsType="ceylon.language::SequenceBuilder<Element>")
@TypeParameters(@TypeParameter(value = "Element"))
public class SequenceAppender<Element> extends SequenceBuilder<Element> {
@ceylon.language.SharedAnnotation$annotation$
public class SequenceAppender<Element>
extends SequenceBuilder<Element> {

public SequenceAppender(@Ignore TypeDescriptor $reifiedElement,
@Name("elements")
Expand Down
4 changes: 3 additions & 1 deletion runtime/ceylon/language/SequenceBuilder.java
Expand Up @@ -13,7 +13,9 @@
@Ceylon(major = 6)
@Class
@TypeParameters(@TypeParameter(value = "Element"))
public class SequenceBuilder<Element> implements ReifiedType {
@ceylon.language.SharedAnnotation$annotation$
public class SequenceBuilder<Element>
implements ReifiedType {

private final static int MIN_CAPACITY = 5;
private final static int MAX_CAPACITY = java.lang.Integer.MAX_VALUE;
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/String.java
Expand Up @@ -20,6 +20,7 @@
"ceylon.language::Summable<ceylon.language::String>",
"ceylon.language::Ranged<ceylon.language::Integer,ceylon.language::String>"})
@ValueType
@ceylon.language.SharedAnnotation$annotation$
public final class String
implements Comparable<String>, List<Character>,
Summable<String>, ReifiedType {
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/StringBuilder.java
Expand Up @@ -11,6 +11,7 @@

@Ceylon(major = 6)
@Class
@ceylon.language.SharedAnnotation$annotation$
public class StringBuilder implements ReifiedType {

@Ignore
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/Tuple.java
Expand Up @@ -49,6 +49,7 @@
satisfies = {"ceylon.language::Sequential<Element>"},
caseTypes = {},
defaultValue = "ceylon.language::Empty")})
@ceylon.language.SharedAnnotation$annotation$
public final class Tuple<Element, First extends Element,
Rest extends Sequential<? extends Element>>
extends ArraySequence<Element>
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/arrayOfSize_.java
Expand Up @@ -19,6 +19,7 @@ private arrayOfSize_() {}

@TypeParameters(@TypeParameter(value="Element"))
@TypeInfo("ceylon.language::Array<Element>")
@ceylon.language.SharedAnnotation$annotation$
public static <Element> Array<Element> arrayOfSize(@Ignore final TypeDescriptor $reifiedElement,
@Name("size")
@TypeInfo("ceylon.language::Integer")
Expand Down
4 changes: 3 additions & 1 deletion runtime/ceylon/language/className_.java
Expand Up @@ -11,7 +11,9 @@ public final class className_ {

private className_() {}

public static java.lang.String className(@Name("obj")
@ceylon.language.SharedAnnotation$annotation$
public static java.lang.String
className(@Name("obj")
@TypeInfo("ceylon.language::Object")
final java.lang.Object object) {
return object.getClass().getName();
Expand Down
3 changes: 2 additions & 1 deletion runtime/ceylon/language/false_.java
Expand Up @@ -7,7 +7,8 @@
public class false_ extends Boolean {

private final static false_ value = new false_();


@ceylon.language.SharedAnnotation$annotation$
public static false_ get_(){
return value;
}
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/flatten_.java
Expand Up @@ -21,6 +21,7 @@ private flatten_() {}
@TypeParameters({@TypeParameter(value="Return"),
@TypeParameter(value="Args", satisfies="ceylon.language::Sequential<ceylon.language::Anything>")})
@TypeInfo("ceylon.language::Callable<Return,Args>")
@ceylon.language.SharedAnnotation$annotation$
public static <Return,Args> Callable<Return> flatten(
@Ignore final TypeDescriptor $reifiedReturn,
@Ignore final TypeDescriptor $reifiedArgs,
Expand Down
7 changes: 4 additions & 3 deletions runtime/ceylon/language/identityHash_.java
Expand Up @@ -9,10 +9,11 @@
@Method
public final class identityHash_ {

private identityHash_() {
}
private identityHash_() {}

public static long identityHash(@Name("x")
@ceylon.language.SharedAnnotation$annotation$
public static long
identityHash(@Name("x")
@TypeInfo("ceylon.language::Identifiable")
final java.lang.Object x) {
return System.identityHashCode(x);
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/infinity_.java
Expand Up @@ -6,6 +6,7 @@
@Ceylon(major = 6) @Attribute
public class infinity_ {

@ceylon.language.SharedAnnotation$annotation$
public static double get_(){
return Double.POSITIVE_INFINITY;
}
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/internalSort_.java
Expand Up @@ -20,6 +20,7 @@ private internalSort_() {}

@TypeParameters(@TypeParameter(value="Element"))
@TypeInfo("ceylon.language::Sequential<Element>")
@ceylon.language.SharedAnnotation$annotation$
static <Element> Sequential<? extends Element> internalSort(@Ignore TypeDescriptor $reifiedElement,
@Name("comparing")
@TypeInfo("ceylon.language::Callable<ceylon.language::Comparison|ceylon.language::Null,ceylon.language::Tuple<Element,Element,ceylon.language::Tuple<Element,Element,ceylon.language::Empty>>>")
Expand Down
2 changes: 2 additions & 0 deletions runtime/ceylon/language/language_.java
Expand Up @@ -5,6 +5,7 @@
import com.redhat.ceylon.compiler.java.metadata.Object;

@Ceylon(major = 6) @Object
@ceylon.language.SharedAnnotation$annotation$
public final class language_ {

public java.lang.String getVersion() {
Expand Down Expand Up @@ -43,6 +44,7 @@ public java.lang.String toString() {
private language_() {}
private static final language_ value = new language_();

@ceylon.language.SharedAnnotation$annotation$
public static language_ get_() {
return value;
}
Expand Down
5 changes: 3 additions & 2 deletions runtime/ceylon/language/operatingSystem_.java
Expand Up @@ -5,10 +5,12 @@

@Ceylon(major = 6)
@Object
@ceylon.language.SharedAnnotation$annotation$
public final class operatingSystem_ {

private static final operatingSystem_ value = new operatingSystem_();

@ceylon.language.SharedAnnotation$annotation$
public static operatingSystem_ get_() {
return value;
}
Expand All @@ -17,8 +19,7 @@ public static operatingSystem_ get_() {
private final java.lang.String fileSeparator = System.getProperty("file.separator");
private final java.lang.String pathSeparator = System.getProperty("path.separator");

private operatingSystem_() {
}
private operatingSystem_() {}

public java.lang.String getName() {
java.lang.String os = System.getProperty("os.name").toLowerCase();
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/parseFloat_.java
Expand Up @@ -37,6 +37,7 @@ private static int exponentFromSuffix(char suffix) {
}

@TypeInfo("ceylon.language::Null|ceylon.language::Float")
@ceylon.language.SharedAnnotation$annotation$
public static Float parseFloat(@Name("string") java.lang.String string) {
final int length = string.length();
if (length == 0) {
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/printStackTrace_.java
Expand Up @@ -18,6 +18,7 @@
@Method
public final class printStackTrace_
{
@ceylon.language.SharedAnnotation$annotation$
public static void printStackTrace(
@Name("exception") final java.lang.Throwable throwable,
@TypeInfo("ceylon.language::Callable<ceylon.language::Anything,ceylon.language::Tuple<ceylon.language::String,ceylon.language::String,ceylon.language::Empty>>")
Expand Down
2 changes: 2 additions & 0 deletions runtime/ceylon/language/process_.java
Expand Up @@ -10,6 +10,7 @@
import com.redhat.ceylon.compiler.java.metadata.TypeInfo;

@Ceylon(major = 6) @Object
@ceylon.language.SharedAnnotation$annotation$
public final class process_ {

@SuppressWarnings("unchecked")
Expand Down Expand Up @@ -178,6 +179,7 @@ public java.lang.String toString() {
private process_() {}
private static final process_ value = new process_();

@ceylon.language.SharedAnnotation$annotation$
public static process_ get_() {
return value;
}
Expand Down
2 changes: 2 additions & 0 deletions runtime/ceylon/language/runtime_.java
Expand Up @@ -5,10 +5,12 @@
import com.redhat.ceylon.compiler.java.metadata.Object;

@Ceylon(major = 6) @Object
@ceylon.language.SharedAnnotation$annotation$
public final class runtime_ {

private static final runtime_ value = new runtime_();

@ceylon.language.SharedAnnotation$annotation$
public static runtime_ get_() {
return value;
}
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/suppressedExceptions_.java
Expand Up @@ -12,6 +12,7 @@ public final class suppressedExceptions_ {
private suppressedExceptions_() {}

@TypeInfo("ceylon.language::Sequential<ceylon.language::Exception>")
@ceylon.language.SharedAnnotation$annotation$
public static ceylon.language.Sequential<? extends java.lang.Throwable> suppressedExceptions(
@Name("exception")
@TypeInfo("ceylon.language::Exception")
Expand Down
2 changes: 2 additions & 0 deletions runtime/ceylon/language/system_.java
Expand Up @@ -7,10 +7,12 @@
import com.redhat.ceylon.compiler.java.metadata.Object;

@Ceylon(major = 6) @Object
@ceylon.language.SharedAnnotation$annotation$
public final class system_ {

private static final system_ value = new system_();

@ceylon.language.SharedAnnotation$annotation$
public static system_ get_() {
return value;
}
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/true_.java
Expand Up @@ -8,6 +8,7 @@ public class true_ extends Boolean {

private final static true_ value = new true_();

@ceylon.language.SharedAnnotation$annotation$
public static true_ get_(){
return value;
}
Expand Down
1 change: 1 addition & 0 deletions runtime/ceylon/language/unflatten_.java
Expand Up @@ -20,6 +20,7 @@ private unflatten_() {}
@TypeParameters({@TypeParameter(value="Return"),
@TypeParameter(value="Args", satisfies="ceylon.language::Sequential<ceylon.language::Anything>")})
@TypeInfo("ceylon.language::Callable<Return,ceylon.language::Tuple<Args,Args,ceylon.language::Empty>>")
@ceylon.language.SharedAnnotation$annotation$
public static <Return,Args> Callable<Return> unflatten(
@Ignore TypeDescriptor $reifiedReturn,
@Ignore TypeDescriptor $reifiedArgs,
Expand Down

1 comment on commit 70a575d

@gavinking
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots still missing! See #408.

Please sign in to comment.