Package deltix.util.jcg.scg
Class CSharpSrcGenContext
- java.lang.Object
 - 
- deltix.util.jcg.scg.JContextImpl
 - 
- deltix.util.jcg.scg.CSharpSrcGenContext
 
 
 
- 
- All Implemented Interfaces:
 JContext
public class CSharpSrcGenContext extends JContextImpl
Generates C# source code. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCSharpSrcGenContext.AssertMode 
- 
Constructor Summary
Constructors Constructor Description CSharpSrcGenContext() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JAnnotationannotation(JTypeImpl clazz, java.lang.Object... args)JAnnotationannotation(java.lang.Class<?> clazz, java.lang.Object... args)JStatementassertStmt(JExpr passCond, JExpr message)JExprclassLiteral(JClass value)JExprclassLiteral(java.lang.Class<?> value)JExprenumLiteral(java.lang.Object value)CSharpSrcGenContext.AssertModegetAssertMode()JExprinstanceOf(JExpr arg, JType toType)JExprinstanceOf(JExpr arg, java.lang.Class<?> toClass)protected voidprintModifiers(int mods, SourceCodePrinter out)protected voidprintType(java.lang.String type, SourceCodePrinter out)protected voidprintType(java.lang.String type, java.lang.String[] typeArgs, SourceCodePrinter out)voidsetAssertMode(CSharpSrcGenContext.AssertMode assertHandling)JExprstaticCall(java.lang.Class<?> cls, java.lang.String method, java.lang.Class<?> typeArgument, JExpr... args)java.lang.StringtranslateType(java.lang.String type)JExprtypeof(JClass type)JExprtypeof(java.lang.Class<?> type)- 
Methods inherited from class deltix.util.jcg.scg.JContextImpl
arrayInitializer, arrayInitializer, arrayLength, arrayTypeOf, arrayTypeOf, asType, binExpr, booleanLiteral, breakStmt, breakStmt, call, charLiteral, cn, cn, cn, cn, compStmt, condExpr, conjunction, continueStmt, disjunction, doubleLiteral, enumLiteral, falseLiteral, floatLiteral, forStmt, ifStmt, ifStmt, ifStmt, ifStmt, intLiteral, localVarRef, longLiteral, newArrayExpr, newClass, newClass, newExpr, newExpr, newGenericExpr, nullLiteral, returnStmt, staticCall, staticVarRef, staticVarRef, staticVarRef, stringLiteral, sum, supplierWithNew, thisLiteral, trueLiteral, tryStmt 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getAssertMode
public CSharpSrcGenContext.AssertMode getAssertMode()
 
- 
setAssertMode
public void setAssertMode(CSharpSrcGenContext.AssertMode assertHandling)
 
- 
assertStmt
public JStatement assertStmt(JExpr passCond, JExpr message)
 
- 
classLiteral
public JExpr classLiteral(java.lang.Class<?> value)
 
- 
typeof
public JExpr typeof(java.lang.Class<?> type)
 
- 
staticCall
public JExpr staticCall(java.lang.Class<?> cls, java.lang.String method, java.lang.Class<?> typeArgument, JExpr... args)
 
- 
enumLiteral
public JExpr enumLiteral(java.lang.Object value)
 
- 
annotation
public JAnnotation annotation(java.lang.Class<?> clazz, java.lang.Object... args)
- Parameters:
 clazz- - the class of Annotationargs- - Elements of the Annotation. Even elements are the keys. Odd elements are the values. One element if only value() parameter exists.- Returns:
 - JAnnotation's instance
 
Example:
Annotationpublic @interface TODO {will be created as
String author ();
String date ();
int currentRevision ();
String value ();
}
JContext.annotation (TODO.class, "author", "Author Name", "date", "2010-01-01", "currentRevision", 1, "value", "SOME VALUE")
Annotationpublic @interface MappedTo {will be created as
String value ();
}
JContext.annotation ("TE$$T") 
 
- 
annotation
public JAnnotation annotation(JTypeImpl clazz, java.lang.Object... args)
 
- 
translateType
public java.lang.String translateType(java.lang.String type)
 
- 
printModifiers
protected void printModifiers(int mods, SourceCodePrinter out) throws java.io.IOException- Specified by:
 printModifiersin classJContextImpl- Throws:
 java.io.IOException
 
- 
printType
protected void printType(java.lang.String type, SourceCodePrinter out) throws java.io.IOException- Specified by:
 printTypein classJContextImpl- Throws:
 java.io.IOException
 
- 
printType
protected void printType(java.lang.String type, java.lang.String[] typeArgs, SourceCodePrinter out) throws java.io.IOException- Specified by:
 printTypein classJContextImpl- Throws:
 java.io.IOException
 
 - 
 
 -