Changes
This commit is contained in:
parent
0c825f6b5f
commit
bc60a8f561
@ -19,6 +19,6 @@ import java.lang.annotation.Target;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.FIELD)
|
@Target(ElementType.FIELD)
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public @interface Const {
|
public @interface const_ {
|
||||||
String description() default "";
|
String description() default "";
|
||||||
}
|
}
|
@ -8,13 +8,13 @@ package com.openeggbert.jdotnet.JDotNet.CSharpKeyWords;
|
|||||||
*
|
*
|
||||||
* @author robertvokac
|
* @author robertvokac
|
||||||
*/
|
*/
|
||||||
public class Default_ {
|
public class default_ {
|
||||||
|
|
||||||
private Default_() {
|
private default_() {
|
||||||
//Not meant to be instantiated.
|
//Not meant to be instantiated.
|
||||||
}
|
}
|
||||||
|
|
||||||
public static <T extends Struct<T>> T default_(T instance) {
|
public static <T extends struct<T>> T default_(T instance) {
|
||||||
instance.reset();
|
instance.reset();
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.openeggbert.jdotnet.JDotNet.CSharpKeyWords;
|
||||||
|
|
||||||
|
import com.openeggbert.jdotnet.JDotNet.AdditionalClassForDotNetSimulation;
|
||||||
|
import java.lang.annotation.ElementType;
|
||||||
|
import java.lang.annotation.Retention;
|
||||||
|
import java.lang.annotation.RetentionPolicy;
|
||||||
|
import java.lang.annotation.Target;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author robertvokac
|
||||||
|
* Simulates the C# key word internal.
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR})
|
||||||
|
@AdditionalClassForDotNetSimulation
|
||||||
|
public @interface internal {
|
||||||
|
String description() default "";
|
||||||
|
}
|
@ -19,6 +19,6 @@ import java.lang.annotation.Target;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public @interface Namespace {
|
public @interface namespace {
|
||||||
String name();
|
String name();
|
||||||
}
|
}
|
@ -19,6 +19,6 @@ import java.lang.annotation.Target;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.PARAMETER)
|
@Target(ElementType.PARAMETER)
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public @interface Nullable {
|
public @interface nullable {
|
||||||
String description() default "";
|
String description() default "";
|
||||||
}
|
}
|
@ -19,6 +19,6 @@ import java.lang.annotation.Target;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.PARAMETER)
|
@Target(ElementType.PARAMETER)
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public @interface Out {
|
public @interface out {
|
||||||
String description() default "";
|
String description() default "";
|
||||||
}
|
}
|
@ -17,8 +17,8 @@ import java.lang.annotation.Target;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.FIELD)
|
@Target({ElementType.TYPE_USE, ElementType.FIELD})
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public @interface Readonly {
|
public @interface readonly {
|
||||||
String description() default "";
|
String description() default "";
|
||||||
}
|
}
|
@ -19,6 +19,6 @@ import java.lang.annotation.Target;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.PARAMETER)
|
@Target(ElementType.PARAMETER)
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public @interface Ref {
|
public @interface ref {
|
||||||
String description() default "";
|
String description() default "";
|
||||||
}
|
}
|
@ -19,6 +19,6 @@ import java.lang.annotation.Target;
|
|||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
@Target(ElementType.TYPE)
|
@Target(ElementType.TYPE)
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public @interface StaticClass {
|
public @interface static_ {
|
||||||
String description() default "";
|
String description() default "";
|
||||||
}
|
}
|
@ -12,7 +12,7 @@ import com.openeggbert.jdotnet.JDotNet.AdditionalClassForDotNetSimulation;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
@AdditionalClassForDotNetSimulation
|
@AdditionalClassForDotNetSimulation
|
||||||
public abstract class Struct<T> {
|
public abstract class struct<T> {
|
||||||
public abstract T copy();
|
public abstract T copy();
|
||||||
/**
|
/**
|
||||||
* Sets this class to its default values.
|
* Sets this class to its default values.
|
43
src/main/java/com/openeggbert/jdotnet/System/Boolean.java
Normal file
43
src/main/java/com/openeggbert/jdotnet/System/Boolean.java
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.openeggbert.jdotnet.System;
|
||||||
|
|
||||||
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.struct;
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.readonly;
|
||||||
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.const_;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author robertvokac
|
||||||
|
*/
|
||||||
|
@AllArgsConstructor(access = AccessLevel.PRIVATE)
|
||||||
|
@readonly
|
||||||
|
class Boolean extends struct<Boolean> {
|
||||||
|
|
||||||
|
protected Boolean() {
|
||||||
|
this.m_value = false;
|
||||||
|
//Not meant to be instantiated.
|
||||||
|
}
|
||||||
|
private @readonly final boolean m_value;
|
||||||
|
public boolean get() {
|
||||||
|
return m_value;
|
||||||
|
}
|
||||||
|
public static Boolean of(boolean b) {
|
||||||
|
return new Boolean(b);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public Boolean copy() {
|
||||||
|
return new Boolean(m_value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean reset() {
|
||||||
|
throw new UnsupportedOperationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,6 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.openeggbert.jdotnet.System.Collections.Generic;
|
package com.openeggbert.jdotnet.System.Collections.Generic;
|
||||||
|
|
||||||
|
import com.openeggbert.jdotnet.System.IO.Stream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@ -57,4 +58,18 @@ public class List_<T> implements Iterable<T> {
|
|||||||
return internalList.contains(o);
|
return internalList.contains(o);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean Any() {
|
||||||
|
return !internalList.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void RemoveAt(int i) {
|
||||||
|
internalList.remove(i);
|
||||||
|
}
|
||||||
|
public int Count() {
|
||||||
|
return internalList.size();
|
||||||
|
}
|
||||||
|
public java.util.stream.Stream<T> stream() {
|
||||||
|
return internalList.stream();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,13 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.openeggbert.jdotnet.System.Reflection;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author robertvokac
|
||||||
|
*/
|
||||||
|
public class Assembly {
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.openeggbert.jdotnet.System.Resources;
|
||||||
|
|
||||||
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.nullable;
|
||||||
|
import com.openeggbert.jdotnet.System.Globalization.CultureInfo;
|
||||||
|
import com.openeggbert.jdotnet.System.Reflection.Assembly;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author robertvokac
|
||||||
|
*/
|
||||||
|
public class ResourceManager {
|
||||||
|
|
||||||
|
public static String GetString(String name, @nullable CultureInfo culture) {
|
||||||
|
return null;
|
||||||
|
//todo
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResourceManager(String windowsPhoneSpeedyBlupiResource, Assembly Assembly) {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,7 +4,7 @@
|
|||||||
*/
|
*/
|
||||||
package com.openeggbert.jdotnet.System;
|
package com.openeggbert.jdotnet.System;
|
||||||
|
|
||||||
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.Struct;
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.struct;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
@ -14,7 +14,7 @@ import lombok.NoArgsConstructor;
|
|||||||
*/
|
*/
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class TimeSpan extends Struct<TimeSpan> {
|
public class TimeSpan extends struct<TimeSpan> {
|
||||||
public static TimeSpan FromTicks(long ticks) {return null;}
|
public static TimeSpan FromTicks(long ticks) {return null;}
|
||||||
public static TimeSpan FromSeconds(double seconds) {return null;}
|
public static TimeSpan FromSeconds(double seconds) {return null;}
|
||||||
private long _ticks;
|
private long _ticks;
|
||||||
|
23
src/main/java/com/openeggbert/jdotnet/System/Type.java
Normal file
23
src/main/java/com/openeggbert/jdotnet/System/Type.java
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.openeggbert.jdotnet.System;
|
||||||
|
|
||||||
|
import com.openeggbert.jdotnet.System.Reflection.Assembly;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author robertvokac
|
||||||
|
*/
|
||||||
|
public class Type {
|
||||||
|
public Assembly Assembly() {
|
||||||
|
return null;
|
||||||
|
//todo
|
||||||
|
}
|
||||||
|
public static Type typeof(Class clazz) {
|
||||||
|
return null;
|
||||||
|
//todo
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -4,18 +4,29 @@
|
|||||||
*/
|
*/
|
||||||
package com.openeggbert.jdotnet.System;
|
package com.openeggbert.jdotnet.System;
|
||||||
|
|
||||||
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.Const;
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.struct;
|
||||||
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.const_;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author robertvokac
|
* @author robertvokac
|
||||||
*/
|
*/
|
||||||
public class UInt32 {
|
public class UInt32 extends struct<UInt32> {
|
||||||
|
|
||||||
protected UInt32() {
|
protected UInt32() {
|
||||||
//Not meant to be instantiated.
|
//Not meant to be instantiated.
|
||||||
}
|
}
|
||||||
public @Const static final long MaxValue = 0xFFFFFFFFL; // 32-bit unsigned maximum value
|
public @const_ static final long MaxValue = 0xFFFFFFFFL; // 32-bit unsigned maximum value
|
||||||
public @Const static final long MinValue = 0;
|
public @const_ static final long MinValue = 0;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UInt32 copy() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UInt32 reset() {
|
||||||
|
throw new UnsupportedOperationException("Not supported yet."); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/GeneratedMethodBody
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
17
src/main/java/com/openeggbert/jdotnet/System/bool.java
Normal file
17
src/main/java/com/openeggbert/jdotnet/System/bool.java
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.openeggbert.jdotnet.System;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author robertvokac
|
||||||
|
*/
|
||||||
|
class bool extends Boolean {
|
||||||
|
|
||||||
|
public static bool of(boolean b) {
|
||||||
|
return (bool) of(b);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
19
src/main/java/com/openeggbert/jdotnet/System/object.java
Normal file
19
src/main/java/com/openeggbert/jdotnet/System/object.java
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
/*
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||||
|
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
|
||||||
|
*/
|
||||||
|
package com.openeggbert.jdotnet.System;
|
||||||
|
|
||||||
|
import com.openeggbert.jdotnet.JDotNet.CSharpKeyWords.nullable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author robertvokac
|
||||||
|
*/
|
||||||
|
public class object {
|
||||||
|
public static boolean ReferenceEquals(@nullable Object objA, @nullable Object objB) {
|
||||||
|
if(objA == null && objB == null) {return true;}
|
||||||
|
if(objA == null || objB == null) {return false;}
|
||||||
|
return objA.equals(objB);
|
||||||
|
}
|
||||||
|
}
|
@ -4,12 +4,14 @@
|
|||||||
*/
|
*/
|
||||||
package com.openeggbert.jdotnet.System;
|
package com.openeggbert.jdotnet.System;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author robertvokac
|
* @author robertvokac
|
||||||
*/
|
*/
|
||||||
public class string extends String_ {
|
public class string extends String_ {
|
||||||
|
|
||||||
|
public string(char ch, int times) {
|
||||||
|
super(ch, times);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user