Changes between Version 1 and Version 2 of WikiStart


Ignore:
Timestamp:
01/29/2008 09:31:46 PM (18 years ago)
Author:
dsowen
Comment:

Copied from original page.

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v1 v2  
    1 = Welcome to Trac 0.10.3.1 =
     1= accesslib =
    22
    3 Trac is a '''minimalistic''' approach to '''web-based''' management of
    4 '''software projects'''. Its goal is to simplify effective tracking and handling of software issues, enhancements and overall progress.
    5 
    6 All aspects of Trac have been designed with the single goal to
    7 '''help developers write great software''' while '''staying out of the way'''
    8 and imposing as little as possible on a team's established process and
    9 culture.
    10 
    11 As all Wiki pages, this page is editable, this means that you can
    12 modify the contents of this page simply by using your
    13 web-browser. Simply click on the "Edit this page" link at the bottom
    14 of the page. WikiFormatting will give you a detailed description of
    15 available Wiki formatting commands.
    16 
    17 "[wiki:TracAdmin trac-admin] ''yourenvdir'' initenv" created
    18 a new Trac environment, containing a default set of wiki pages and some sample
    19 data. This newly created environment also contains
    20 [wiki:TracGuide documentation] to help you get started with your project.
    21 
    22 You can use [wiki:TracAdmin trac-admin] to configure
    23 [http://trac.edgewall.org/ Trac] to better fit your project, especially in
    24 regard to ''components'', ''versions'' and ''milestones''.
     3 1. Download
     4 2. Quick introduction
    255
    266
    27 TracGuide is a good place to start.
    287
    29 Enjoy! [[BR]]
    30 ''The Trac Team''
     8== Download ==
    319
    32 == Starting Points ==
     10|| Version          || Formats                                                                    ||
     11|| 2005-10-04T22:55 || [http://www.fugue88.ws/projects/accesslib/accesslib-20051004T2255.zip zip] ||
    3312
    34  * TracGuide --  Built-in Documentation
    35  * [http://trac.edgewall.org/ The Trac project] -- Trac Open Source Project
    36  * [http://trac.edgewall.org/wiki/TracFaq Trac FAQ] -- Frequently Asked Questions
    37  * TracSupport --  Trac Support
    3813
    39 For a complete list of local wiki pages, see TitleIndex.
     14
     15== Quick introduction ==
     16
     17In Java, variables refer to instances of objects.  There's no way to refer to the reference of a variable, in order to indirectly change to what object it refers.  ''accesslib'' provides an abstract mechanism for manipulating references (as opposed to manipulating objects).
     18
     19A quick example:
     20
     21{{{
     22class Example {
     23
     24        int i;
     25
     26        void manipulate(Accessor a)
     27        {
     28                if(a.getType() == String.class) {
     29                        a.setValue("Hello, world!");
     30                } else if(a.getType() == Integer.class) {
     31                        a.setValue(new Integer(13));
     32                }
     33        }
     34
     35        void foobar()
     36        {
     37                HashMap map = new HashMap();
     38                Accessor a = new MapAccessor(map, "my key", String.class);
     39                manipulate(a);
     40
     41                // Prints "Hello, world!".
     42                System.out.println(map.get("my key"));
     43
     44                i = 0;
     45                a = new IAccessor();
     46                manipulate(a);
     47
     48                // Prints "13".
     49                System.out.println(i);
     50        }
     51
     52        class IAccessor implements Accessor {
     53                void Class getType() { return Integer.class; }
     54                void clearValue() { i = 0; }
     55                Object getValue() { return Integer.valueOf(i); }
     56                void setValue(Object value) { i = ((Integer)value).intValue(); }
     57        }
     58}
     59}}}