jaxws/src/jdk.xml.bind/share/classes/com/sun/codemodel/internal/package-info.java
changeset 33547 e4c76ac38b12
parent 25871 b80b84e87032
equal deleted inserted replaced
33390:d131f4b8433a 33547:e4c76ac38b12
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    32  *
    32  *
    33  * <p>
    33  * <p>
    34  * With CodeModel, you build the java source code by first building AST,
    34  * With CodeModel, you build the java source code by first building AST,
    35  * then writing it out as text files that is Java source files.
    35  * then writing it out as text files that is Java source files.
    36  * The AST looks like this:
    36  * The AST looks like this:
    37  *
       
    38  * {@DotDiagram
       
    39     digraph G {
       
    40         cls1 [label="JDefinedClass"];
       
    41         cls2 [label="JDefinedClass"];
       
    42         JCodeModel -> cls1 [label="generated class"];
       
    43         JCodeModel -> cls2 [label="generated class"];
       
    44 
       
    45         m1 [label="JMethod"];
       
    46         m2 [label="JMethod"];
       
    47 
       
    48         cls1 -> m1;
       
    49         cls1 -> m2;
       
    50         cls1 -> JField;
       
    51 
       
    52         m1 -> JVar [label="method parameter"];
       
    53         m1 -> JBlock [label="code"];
       
    54     }
       
    55  * }
       
    56  *
    37  *
    57  * <p>
    38  * <p>
    58  * You bulid this tree mostly from top-down. So, you first create
    39  * You bulid this tree mostly from top-down. So, you first create
    59  * a new {@link JDefinedClass} from {@link JCodeModel}, then you
    40  * a new {@link JDefinedClass} from {@link JCodeModel}, then you
    60  * create a {@link JMethod} from {@link JDefinedClass}, and so on.
    41  * create a {@link JMethod} from {@link JDefinedClass}, and so on.
   105  * Compared to template-based code generator, the writing operation
    86  * Compared to template-based code generator, the writing operation
   106  * is slow, as it needs to traverse each AST node. Consider
    87  * is slow, as it needs to traverse each AST node. Consider
   107  * pre-encoding tokens (like 'public') to the target encoding,
    88  * pre-encoding tokens (like 'public') to the target encoding,
   108  * and consider exploting the subtree equivalence.
    89  * and consider exploting the subtree equivalence.
   109  *
    90  *
   110  * @ArchitectureDocument
       
   111  */
    91  */
   112 package com.sun.codemodel.internal;
    92 package com.sun.codemodel.internal;
   113 
    93 
   114 import java.util.List;
    94 import java.util.List;
   115 import java.util.Map;
    95 import java.util.Map;