close Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Initial Version and Version 1 of JCopManual


Ignore:
Timestamp:
01/12/2011 04:31:12 PM (9 years ago)
Author:
malte.appeltauer
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JCopManual

    v1 v1  
     1== Command Line Tools ==
     2In the following we describe the usage of the JCop language compiler that is able to compile programs of the JCop and Java programming language. The compiler implements the language as defined in the JCop language specification version 1.0. The language definition has continuously been revised to precisely specify the language including various corner cases and combinations of features. The compiler is an extension to the JastAddJ Java compiler that is implemented based on the [http://jastadd.org/JastAdd JastAdd compiler framework].
     3
     4
     5=== Compile ===
     6==== Synopsis ====
     7   {{{jcopc  [Options]  [file]}}}
     8
     9==== Description ====
     10The jcopc  command compiles JCop and Java source, producing .class files compliant
     11with any Java VM (1.1 or later). The argument after the options specifies the source file
     12to compile. Source files are specified by their full qualified name (package name + type
     13name), separated by a dot (".") (rather than a folder delimiter as for javac).
     14
     15==== Options ====
     16{{{-classpath  <path>}}}
     17  Specify where to find user class files and annotation processors.
     18
     19{{{-sourcepath  <path>}}}
     20  Specify where to find input source files. Only required if the sources aren’t located in the working directory. [[BR]]
     21  Example:
     22  {{{
     23  jcopc  -sourcepath  src  myPckg.MyMainClass
     24  }}}
     25
     26{{{-d  <directory>}}}
     27  Specify where to place generated class files.  [[BR]]
     28  Example:
     29  {{{
     30  jcopc  -d  bin  -sourcepath  src  myPckg.MyMainClass
     31  }}}
     32
     33{{{-sourcedump  <path>}}}
     34  Dumps Java source files of the compiled classes into the specified folder.  [[BR]]
     35  Example:
     36  {{{
     37  jcopc  -sourcedump  dump  myPckg.MyMainClass
     38  }}}
     39
     40{{{-agg  <path>}}}
     41  Generates a file containing an AGG graph representation of the program’s AST. [[BR]]
     42  Example:
     43  {{{
     44  jcopc  -agg  output/agg  myPckg.MyMainClass
     45  }}}
     46
     47{{{-ctl}}}
     48  Output JCop specific messages about what the compiler is doing. [[BR]]
     49  Example:
     50  {{{
     51  jcopc  -ctl  myPckg.MyMainClass
     52  ...
     53  >  copying  PartialMethod.java
     54  >  to  src\jcop\lang
     55  >  ..done
     56  ...
     57  >  compiling:...src\de\uni_potsdam\hpi\swa\Widget.jcop  ..done
     58  >  compiling:jcop\lang\Composition.java  ..done
     59  ...
     60  >  ..done
     61  >  compile  and  weave  auxilliary  aspect    bin\jcop\lang\JCopAspect.aj
     62  >  ..done
     63  >  compiled  in  3723  millis
     64  }}}
     65
     66{{{-rtl}}}
     67  Loggs layer activation and composition information at runtime.  [[BR]]
     68  Example:
     69  {{{
     70  jcopc  -rtl  myPckg.MyMainClass
     71  ...
     72  >  INFO:  accessing  base  method  of  getBMI
     73  >  INFO:  accessing  method  getBMI  of  layer  Visualization
     74  ...
     75  }}}
     76
     77{{{-verbose}}}
     78  Output messages about what the compiler is doing
     79
     80{{{-help}}}
     81  Print a synopsis of standard options
     82
     83{{{-aspectinfo}}}
     84  Output messages about aspect weaving
     85
     86{{{-version}}}
     87  Print version information.
     88
     89{{{-xml-outline-path  <path>}}}
     90  Generate an outline in XML format (useful for development environments)
     91
     92{{{-class-in-layer-outline}}}
     93  Generate an outline in XML format (useful for development environments)
     94
     95==== File Names ====
     96jcopc accepts source files with either the .java extension or the .jcop extension.
     97
     98
     99=== Launch ===
     100==== Synopsis ====
     101   {{{jcop [Options] class [ argument ]}}}
     102
     103==== Description ====
     104The jcop command launches a JCop or Java application. It does this by starting a Java runtime environment (instrumented with the AspectJ weaver), loading a specified class, and invoking that class's main method. The method declaration must look like a plain Java main method:
     105       
     106   {{{ public static void main(String args[]) {...} }}}
     107
     108
     109The method must be declared public and static, it must not return any value, and it must accept a String array as a parameter. By default, the first non-option argument is the name of the class to be invoked. A fully-qualified class name should be used.
     110
     111The argument after the options specifies the class file to compile and by its full qualified name (package name + type name), separated by a dot (".").
     112
     113==== Options ====
     114
     115As options all standard Java options are allowed.   
     116
     117==== File Names ====
     118
     119{{{jcop}}} accepts Java bytecode files with the {{{class}}} extension.