| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="de"> |
| <head> |
| <!-- Generated by javadoc (1.8.0_201) on Wed Apr 24 20:07:02 CEST 2019 --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>CodeGenerator (OpenJPA Parent POM 3.1.0 API)</title> |
| <meta name="date" content="2019-04-24"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CodeGenerator (OpenJPA Parent POM 3.1.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10}; |
| var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CodeGenerator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/openjpa/enhance/ClassRedefiner.html" title="class in org.apache.openjpa.enhance"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/openjpa/enhance/DynamicPersistenceCapable.html" title="interface in org.apache.openjpa.enhance"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/openjpa/enhance/CodeGenerator.html" target="_top">Frames</a></li> |
| <li><a href="CodeGenerator.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.openjpa.enhance</div> |
| <h2 title="Class CodeGenerator" class="title">Class CodeGenerator</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.openjpa.enhance.CodeGenerator</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">CodeGenerator</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">Generates Java class code from metadata.</div> |
| <dl> |
| <dt><span class="simpleTagLabel">Since:</span></dt> |
| <dd>0.3.0</dd> |
| <dt><span class="simpleTagLabel">Author:</span></dt> |
| <dd>Abe White, Stephen Kim</dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colOne" scope="col">Constructor and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#CodeGenerator-org.apache.openjpa.meta.ClassMetaData-">CodeGenerator</a></span>(<a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a> meta)</code> |
| <div class="block">Constructor.</div> |
| </td> |
| </tr> |
| <tr class="rowColor"> |
| <td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#CodeGenerator-org.apache.openjpa.conf.OpenJPAConfiguration-java.lang.Class-">CodeGenerator</a></span>(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a> conf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> type)</code> |
| <div class="block">Constructor.</div> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#closeClassBrace-org.apache.openjpa.lib.util.CodeFormat-">closeClassBrace</a></span>(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</code> |
| <div class="block">Append the closing code-level brace to the code; this can be |
| overridden to add code to the bottom of the class.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode--">generateCode</a></span>()</code> |
| <div class="block">Writes the generated code to the proper directory.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getClassAnnotations--">getClassAnnotations</a></span>()</code> |
| <div class="block">Return class-level annotations.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getClassCode--">getClassCode</a></span>()</code> |
| <div class="block">Return a code template for the given class, or null to use the standard |
| system-generated Java code.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCode--">getCode</a></span>()</code> |
| <div class="block">Return the generated code, or null if <a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode--"><code>generateCode()</code></a> has not |
| been called.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCodeDirectory--">getCodeDirectory</a></span>()</code> |
| <div class="block">The directory to write source to.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getCodeFormat--">getCodeFormat</a></span>()</code> |
| <div class="block">The code formatter for the generated Java code.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getDeclaration-org.apache.openjpa.meta.FieldMetaData-">getDeclaration</a></span>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return a code template for the declaration of the given field, or null |
| to use the system-generated default Java code.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFieldAnnotations-org.apache.openjpa.meta.FieldMetaData-">getFieldAnnotations</a></span>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return field-level annotations.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFieldCode-org.apache.openjpa.meta.FieldMetaData-">getFieldCode</a></span>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return a code template for the get/set methods of the given field, or |
| null to use the system-generated default Java code.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getFile--">getFile</a></span>()</code> |
| <div class="block">Return Java file to write to.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getImportPackages--">getImportPackages</a></span>()</code> |
| <div class="block">Returns the set of packages that needs to be imported for this code.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getInitialValue-org.apache.openjpa.meta.FieldMetaData-">getInitialValue</a></span>(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</code> |
| <div class="block">Return code for the initial value for the given field, or null to use |
| the default generated by the system.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getMetaData--">getMetaData</a></span>()</code> |
| <div class="block">Return metadata for the type being generated.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#getType--">getType</a></span>()</code> |
| <div class="block">Return the type being generated.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>protected <a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#newCodeFormat--">newCodeFormat</a></span>()</code> |
| <div class="block">Return a copy of the internal code format.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>protected void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#openClassBrace-org.apache.openjpa.lib.util.CodeFormat-">openClassBrace</a></span>(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</code> |
| <div class="block">Append the opening code-level brace to the code; this can be |
| overridden to add code to the top of the class.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#setCodeFormat-org.apache.openjpa.lib.util.CodeFormat-">setCodeFormat</a></span>(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> format)</code> |
| <div class="block">Set the code formatter for the generated Java code.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#setDirectory-java.io.File-">setDirectory</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> dir)</code> |
| <div class="block">The directory to write source to.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#useGenericCollections--">useGenericCollections</a></span>()</code> |
| <div class="block">Whether to use generic collections on one-to-many and many-to-many |
| relations instead of untyped collections.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>protected boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#usePropertyBasedAccess--">usePropertyBasedAccess</a></span>()</code> |
| <div class="block">Whether to use property-based access on generated code.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#writeCode--">writeCode</a></span>()</code> |
| <div class="block">Write the generated code to the proper file.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#writeCode-java.io.Writer-">writeCode</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out)</code> |
| <div class="block">Write the code to the specified <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><code>Writer</code></a>.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a name="CodeGenerator-org.apache.openjpa.conf.OpenJPAConfiguration-java.lang.Class-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>CodeGenerator</h4> |
| <pre>public CodeGenerator(<a href="../../../../org/apache/openjpa/conf/OpenJPAConfiguration.html" title="interface in org.apache.openjpa.conf">OpenJPAConfiguration</a> conf, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> type)</pre> |
| <div class="block">Constructor. Supply configuration and class to generate code for.</div> |
| </li> |
| </ul> |
| <a name="CodeGenerator-org.apache.openjpa.meta.ClassMetaData-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>CodeGenerator</h4> |
| <pre>public CodeGenerator(<a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a> meta)</pre> |
| <div class="block">Constructor. Supply configuration and metadata to generate code for.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="getCodeDirectory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCodeDirectory</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> getCodeDirectory()</pre> |
| <div class="block">The directory to write source to. Defaults to the current directory. |
| If the given directory does not match the package of the metadata, the |
| package structure will be created below the directory.</div> |
| </li> |
| </ul> |
| <a name="setDirectory-java.io.File-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDirectory</h4> |
| <pre>public void setDirectory(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> dir)</pre> |
| <div class="block">The directory to write source to. Defaults to the current directory. |
| If the given directory does not match the package of the metadata, the |
| package structure will be created below the directory.</div> |
| </li> |
| </ul> |
| <a name="getCodeFormat--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCodeFormat</h4> |
| <pre>public <a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> getCodeFormat()</pre> |
| <div class="block">The code formatter for the generated Java code.</div> |
| </li> |
| </ul> |
| <a name="setCodeFormat-org.apache.openjpa.lib.util.CodeFormat-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setCodeFormat</h4> |
| <pre>public void setCodeFormat(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> format)</pre> |
| <div class="block">Set the code formatter for the generated Java code.</div> |
| </li> |
| </ul> |
| <a name="getType--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getType</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</a> getType()</pre> |
| <div class="block">Return the type being generated.</div> |
| </li> |
| </ul> |
| <a name="getMetaData--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMetaData</h4> |
| <pre>public <a href="../../../../org/apache/openjpa/meta/ClassMetaData.html" title="class in org.apache.openjpa.meta">ClassMetaData</a> getMetaData()</pre> |
| <div class="block">Return metadata for the type being generated.</div> |
| </li> |
| </ul> |
| <a name="getCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCode</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getCode()</pre> |
| <div class="block">Return the generated code, or null if <a href="../../../../org/apache/openjpa/enhance/CodeGenerator.html#generateCode--"><code>generateCode()</code></a> has not |
| been called.</div> |
| </li> |
| </ul> |
| <a name="generateCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>generateCode</h4> |
| <pre>public void generateCode()</pre> |
| <div class="block">Writes the generated code to the proper directory.</div> |
| </li> |
| </ul> |
| <a name="writeCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeCode</h4> |
| <pre>public void writeCode() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Write the generated code to the proper file.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="writeCode-java.io.Writer-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>writeCode</h4> |
| <pre>public void writeCode(<a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io">Writer</a> out) |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre> |
| <div class="block">Write the code to the specified <a href="https://docs.oracle.com/javase/8/docs/api/java/io/Writer.html?is-external=true" title="class or interface in java.io"><code>Writer</code></a>.</div> |
| <dl> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getImportPackages--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getImportPackages</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a> getImportPackages()</pre> |
| <div class="block">Returns the set of packages that needs to be imported for this code.</div> |
| </li> |
| </ul> |
| <a name="openClassBrace-org.apache.openjpa.lib.util.CodeFormat-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>openClassBrace</h4> |
| <pre>protected void openClassBrace(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</pre> |
| <div class="block">Append the opening code-level brace to the code; this can be |
| overridden to add code to the top of the class.</div> |
| </li> |
| </ul> |
| <a name="closeClassBrace-org.apache.openjpa.lib.util.CodeFormat-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>closeClassBrace</h4> |
| <pre>protected void closeClassBrace(<a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> code)</pre> |
| <div class="block">Append the closing code-level brace to the code; this can be |
| overridden to add code to the bottom of the class.</div> |
| </li> |
| </ul> |
| <a name="getFile--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFile</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="class or interface in java.io">File</a> getFile()</pre> |
| <div class="block">Return Java file to write to.</div> |
| </li> |
| </ul> |
| <a name="newCodeFormat--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>newCodeFormat</h4> |
| <pre>protected <a href="../../../../org/apache/openjpa/lib/util/CodeFormat.html" title="class in org.apache.openjpa.lib.util">CodeFormat</a> newCodeFormat()</pre> |
| <div class="block">Return a copy of the internal code format.</div> |
| </li> |
| </ul> |
| <a name="getClassCode--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClassCode</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getClassCode()</pre> |
| <div class="block">Return a code template for the given class, or null to use the standard |
| system-generated Java code. To facilitate template reuse, the |
| following parameters can appear in the template; the proper values |
| will be subtituted by the system: |
| <ul> |
| <li>${packageDec}: The package declaration, in the form |
| "package <package name >;", or empty string if no package.</li> |
| <li>${imports}: Imports for the packages used by the declared |
| field types.</li> |
| <li>${className}: The name of the class, without package.</li> |
| <li>${extendsDec}: Extends declaration, in the form |
| "extends <superclass>", or empty string if no superclass.</li> |
| <li>${constructor}: A constructor that takes in all primary key fields |
| of the class, or empty string if the class uses datastore identity.</li> |
| <li>${fieldDecs}: Declarations of all the declared fields.</li> |
| <li>${fieldCode}: Get/set methods for all the declared fields.</li> |
| </ul> Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getInitialValue-org.apache.openjpa.meta.FieldMetaData-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInitialValue</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getInitialValue(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return code for the initial value for the given field, or null to use |
| the default generated by the system. Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getDeclaration-org.apache.openjpa.meta.FieldMetaData-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDeclaration</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getDeclaration(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return a code template for the declaration of the given field, or null |
| to use the system-generated default Java code. |
| To facilitate template reuse, the following parameters can appear in |
| your template; the proper values will be subtituted by the system: |
| <ul> |
| <li>${fieldName}: The name of the field.</li> |
| <li>${capFieldName}: The capitalized field name.</li> |
| <li>${propertyName}: The field name without leading '_', if any.</li> |
| <li>${fieldType}: The field's type name.</li> |
| <li>${keyType}: Key type name for maps, null otherwise.</li> |
| <li>${elementType}: Element type name for collections, null otherwise. |
| </li> |
| <li>${fieldValue}: The field's initial value, in the form |
| " = <value>", or empty string if none.</li> |
| </ul> Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getFieldCode-org.apache.openjpa.meta.FieldMetaData-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFieldCode</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> getFieldCode(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return a code template for the get/set methods of the given field, or |
| null to use the system-generated default Java code. |
| To facilitate template reuse, the following parameters can appear in |
| your template; the proper values will be subtituted by the system: |
| <ul> |
| <li>${fieldName}: The name of the field.</li> |
| <li>${capFieldName}: The capitalized field name.</li> |
| <li>${propertyName}: The field name without leading '_', if any.</li> |
| <li>${fieldType}: The field's type name.</li> |
| <li>${keyType}: Key type name for maps, null otherwise.</li> |
| <li>${elementType}: Element type name for collections, null otherwise. |
| </li> |
| <li>${fieldValue}: The field's initial value, in the form |
| "= <value>", or empty string if none.</li> |
| </ul></div> |
| </li> |
| </ul> |
| <a name="usePropertyBasedAccess--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>usePropertyBasedAccess</h4> |
| <pre>protected boolean usePropertyBasedAccess()</pre> |
| <div class="block">Whether to use property-based access on generated code. |
| Defaults to false (field-based).</div> |
| </li> |
| </ul> |
| <a name="getClassAnnotations--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getClassAnnotations</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a> getClassAnnotations()</pre> |
| <div class="block">Return class-level annotations. Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="getFieldAnnotations-org.apache.openjpa.meta.FieldMetaData-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFieldAnnotations</h4> |
| <pre>protected <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a> getFieldAnnotations(<a href="../../../../org/apache/openjpa/meta/FieldMetaData.html" title="class in org.apache.openjpa.meta">FieldMetaData</a> field)</pre> |
| <div class="block">Return field-level annotations. Returns null by default.</div> |
| </li> |
| </ul> |
| <a name="useGenericCollections--"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>useGenericCollections</h4> |
| <pre>protected boolean useGenericCollections()</pre> |
| <div class="block">Whether to use generic collections on one-to-many and many-to-many |
| relations instead of untyped collections. |
| |
| Override in descendants to change default behavior.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CodeGenerator.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../org/apache/openjpa/enhance/ClassRedefiner.html" title="class in org.apache.openjpa.enhance"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../org/apache/openjpa/enhance/DynamicPersistenceCapable.html" title="interface in org.apache.openjpa.enhance"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../index.html?org/apache/openjpa/enhance/CodeGenerator.html" target="_top">Frames</a></li> |
| <li><a href="CodeGenerator.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2006–2019 <a href="http://www.apache.org">Apache Software Foundation</a>. All rights reserved.</small></p> |
| </body> |
| </html> |