Class CSharp


  • public class CSharp
    extends java.lang.Object
    This class contains dummy methods which, if called, have no effect; but calls on these methods are detected by the Java-to-C# converter and affect the C# code that is generated.
    • Constructor Summary

      Constructors 
      Constructor Description
      CSharp()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static <T> T constructorRef​(T methodReference, int arity)
      CSharp.constructor is an identity function that signals to the CSharp transpiler that the argument expression is a method reference to a constructor with a specified number of arguments.
      static void emitCode​(java.lang.String code)
      CSharp.emitCode("goto label") causes the converter to include the code "goto label" in the generated C# code.
      static <T> T methodRef​(T methodReference)
      CSharp.methodRef is an identity function that signals to the CSharp transpiler that the argument expression is a non-static method reference.
      static <T> T staticRef​(T methodReference)
      CSharp.staticRef is an identity function that signals to the CSharp transpiler that the argument expression is a static method reference.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CSharp

        public CSharp()
    • Method Detail

      • emitCode

        public static void emitCode​(java.lang.String code)
        CSharp.emitCode("goto label") causes the converter to include the code "goto label" in the generated C# code. The argument must be supplied as a string literal. At run time, the method has no effect.
        Parameters:
        code - the C# code to be emitted.
      • methodRef

        public static <T> T methodRef​(T methodReference)
        CSharp.methodRef is an identity function that signals to the CSharp transpiler that the argument expression is a non-static method reference.
        Type Parameters:
        T - the class of the argument
        Parameters:
        methodReference - must be supplied in the form of a method reference object::method
        Returns:
        the argument, unchanged.
      • staticRef

        public static <T> T staticRef​(T methodReference)
        CSharp.staticRef is an identity function that signals to the CSharp transpiler that the argument expression is a static method reference.
        Type Parameters:
        T - the class of the argument
        Parameters:
        methodReference - must be supplied in the form of a method reference ClassName::method
        Returns:
        the argument, unchanged.
      • constructorRef

        public static <T> T constructorRef​(T methodReference,
                                           int arity)
        CSharp.constructor is an identity function that signals to the CSharp transpiler that the argument expression is a method reference to a constructor with a specified number of arguments.
        Type Parameters:
        T - the class of the argument
        Parameters:
        methodReference - must be supplied in the form of a method reference ClassName::new
        arity - the number of arguments in the constructor (must be a numeric literal)
        Returns:
        the argument, unchanged.