• DoctypeDeclaration{http://etl.sf.net/etl/doctype/0.2.1}:
    • systemId: "../grammars/EJ.g.etl"
    • context: "MethodContent"
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • ArrayConstructor{http://etl.sf.net/2006/samples/ej/0.1}:
        • values:
          • StringLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: "Hello, World!"
          • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • classifier:
              • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                • value: Integer
            • args:
              • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                • value: 0
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 24
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • ArrayConstructor{http://etl.sf.net/2006/samples/ej/0.1}:
        • values:
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 1
          • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • classifier:
              • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                • value: Integer
            • args:
              • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                • value: 0
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 24
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • ArrayConstructor{http://etl.sf.net/2006/samples/ej/0.1}:
        • values:
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 1
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 2
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 24
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
        • classifier:
          • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: String
        • args:
          • ApplyRoundOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • functor:
              • AccessOp{http://etl.sf.net/2006/samples/ej/0.1}:
                • accessed:
                  • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: bigString
                • feature:
                  • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: substring
            • args:
              • MinusOp{http://etl.sf.net/2006/samples/ej/0.1}:
                • minuend:
                  • ApplyRoundOp{http://etl.sf.net/2006/samples/ej/0.1}:
                    • functor:
                      • AccessOp{http://etl.sf.net/2006/samples/ej/0.1}:
                        • accessed:
                          • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                            • value: bigString
                        • feature:
                          • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                            • value: length
                • subtrahend:
                  • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: 2
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
        • classifier:
          • ApplySquareOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • functor:
              • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                • name: array
            • args:
              • ApplySquareOp{http://etl.sf.net/2006/samples/ej/0.1}:
                • functor:
                  • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                    • name: array
                • args:
                  • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                    • name: int
        • args:
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 10
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
        • classifier:
          • ApplySquareOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • functor:
              • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                • name: array
            • args:
              • ApplySquareOp{http://etl.sf.net/2006/samples/ej/0.1}:
                • functor:
                  • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                    • name: array
                • args:
                  • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                    • name: int
        • args:
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 10
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 10
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
        • classifier:
          • ApplySquareOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • functor:
              • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                • name: array
            • args:
              • ApplySquareOp{http://etl.sf.net/2006/samples/ej/0.1}:
                • functor:
                  • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                    • name: array
                • args:
                  • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: String
        • arrayConstructor:
          • ArrayConstructor{http://etl.sf.net/2006/samples/ej/0.1}:
            • values:
              • ArrayConstructor{http://etl.sf.net/2006/samples/ej/0.1}:
                • values:
                  • NullReference{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: null
                  • StringLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: "b"
                  • StringLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: "c"
              • NullReference{http://etl.sf.net/2006/samples/ej/0.1}:
                • value: null
              • ArrayConstructor{http://etl.sf.net/2006/samples/ej/0.1}:
                • values:
                  • StringLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: "a"
                  • StringLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: "b"
                  • NullReference{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: null
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
        • classifier:
          • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: Runnable
        • classBody:
          • ClassBlock{http://etl.sf.net/2006/samples/ej/0.1}:
            • content:
              • MethodStatement{http://etl.sf.net/2006/samples/ej/0.1}:
                • visibilityModifier:
                  • Modifier{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: public
                • returnType:
                  • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                    • name: void
                • name:
                  • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: run
                • body:
                  • MethodBlock{http://etl.sf.net/2006/samples/ej/0.1}:
                    • content:
                      • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
                        • expression:
                          • ApplyRoundOp{http://etl.sf.net/2006/samples/ej/0.1}:
                            • functor:
                              • AccessOp{http://etl.sf.net/2006/samples/ej/0.1}:
                                • accessed:
                                  • AccessOp{http://etl.sf.net/2006/samples/ej/0.1}:
                                    • accessed:
                                      • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                                        • value: System
                                    • feature:
                                      • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                                        • value: out
                                • feature:
                                  • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                                    • value: println
                            • args:
                              • StringLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                                • value: "Hello, World!"
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • AccessOp{http://etl.sf.net/2006/samples/ej/0.1}:
        • accessed:
          • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: someObject
        • feature:
          • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • classifier:
              • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                • value: TestClass
            • classBody:
              • ClassBlock{http://etl.sf.net/2006/samples/ej/0.1}:
                • content:
                  • MethodStatement{http://etl.sf.net/2006/samples/ej/0.1}:
                    • visibilityModifier:
                      • Modifier{http://etl.sf.net/2006/samples/ej/0.1}:
                        • value: public
                    • returnType:
                      • PrimitiveType{http://etl.sf.net/2006/samples/ej/0.1}:
                        • name: int
                    • name:
                      • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                        • value: test
                    • body:
                      • MethodBlock{http://etl.sf.net/2006/samples/ej/0.1}:
                        • content:
                          • ReturnStatement{http://etl.sf.net/2006/samples/ej/0.1}:
                            • value:
                              • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                                • value: 0
  • ExpressionStatement{http://etl.sf.net/2006/samples/ej/0.1}:
    • expression:
      • ApplyRoundOp{http://etl.sf.net/2006/samples/ej/0.1}:
        • functor:
          • AccessOp{http://etl.sf.net/2006/samples/ej/0.1}:
            • accessed:
              • NewOp{http://etl.sf.net/2006/samples/ej/0.1}:
                • classifier:
                  • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: String
                • args:
                  • CharacterLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
                    • value: 'a'
            • feature:
              • Identifier{http://etl.sf.net/2006/samples/ej/0.1}:
                • value: substring
        • args:
          • IntegerLiteral{http://etl.sf.net/2006/samples/ej/0.1}:
            • value: 1
     1: doctype "../grammars/EJ.g.etl" context "MethodContent";
     2: // array value constructors (http://jcp.org/en/jsr/detail?id=65)
     3: ["Hello, World!", new Integer(0), 24];
     4: [1, new Integer(0), 24];
     5: [1, 2, 24];
     6: // constructors
     7: new String(bigString.substring(bigString.length()-2));
     8: // array constructor samples
     9: new array[array[int]](10);
    10: new array[array[int]](10,10);
    11: new array[array[String]] with [[null,"b","c"],null,["a","b",null]];
    12: // constructor with redefinition sample
    13: new Runnable() {
    14:   to public void run() {System.out.println("Hello, World!");};
    15: };
    16: // redefinition and call of constructor as feature (for inner classes)
    17: someObject.new TestClass() { to public int test() {return 0;};};
    18: // call of method on created object
    19: new String('a').substring(1);