Comments (8)
@glelouet I started at https://github.com/phax/jcodemodel/wiki/How-Tos - I hope this approximately what you were looking for
from jcodemodel.
The unit test https://github.com/phax/jcodemodel/blob/master/src/test/java/com/helger/jcodemodel/InnerClassFuncTest.java is your friend here.
The outcome of this test is:
package org.test;
public class DaTestClass {
public DaTestClass.Inner getInner() {
}
public DaTestClass.Inner.InnerInner getInnerInner() {
}
public DaTestClassInner getInner2() {
}
public DaTestClassInner.Inner2 getInner2Inner() {
}
public class DaTestClassInner {
public class Inner2 {
}
}
public class Inner {
public class InnerInner {
}
}
}
and
package org.test;
import org.test.DaTestClass.DaTestClassInner;
public class OtherClass {
public DaTestClass.Inner getInner() {
}
public DaTestClass.Inner.InnerInner getInnerInner() {
}
public DaTestClassInner.Inner2 getInner2Inner() {
}
public DaTestClass getOuter() {
}
}
Happy coding
from jcodemodel.
you rock :)
from jcodemodel.
Is there a FAQ ? Or a example project to let people have a glance at those use cases ?
Many cases I was wondering how to do some specific thing, like create an enum with abstract method, etc.
from jcodemodel.
No, there is no Wiki yet.
I could create one, but would need input from the community but I don't have the resources to provide the full content on my own. So if there are some volunteers that would help :)
from jcodemodel.
can you make a second project, phax/jcodemodel-examples ? Should be a pom.
that way we can make examples in the example1/src/main/java and they will be automatically compiled to example1/src/generated/java. This is, to avoid having a huge page of examples. Instead you just link those examples source and generated files ; also this way the code will be always up to date as long as the jcodemodel-examples is redeployed.
from jcodemodel.
Well it has pros and cons - when linking to the examples, than it means, that the code is not visible on a single page - than you need to jump back and forth.
On the other hand when having a test project that means, that we can always verify the examples are compiling. Hmmm....
from jcodemodel.
your choice, just a suggestion.
from jcodemodel.
Related Issues (20)
- How can I get the Java Class value for a generated param? HOT 4
- weird issue with snakeyaml HOT 11
- Missing compiler package from 3.4.1 HOT 3
- Migrate off of jsr305 HOT 4
- [proposal] check packages names HOT 19
- [proposal] check class name against keywords and java.lang HOT 10
- https://github.com/eclipse-ee4j/jaxb-ri HOT 3
- create resource directory HOT 45
- in-memory and jar/zip platform HOT 3
- [feature] preprocessors HOT 2
- Missing qualification for inner classes in generic parameters of anonymous classes HOT 4
- Add a method to remove annotations from JDefinedClass or JFieldVar HOT 11
- Enum constant arg with class HOT 3
- Generate *.class HOT 5
- [feature] copying JCodeModel HOT 34
- [lib] use lombok ? HOT 3
- [feature] chaining blocks and instructions HOT 1
- java 16 record ? HOT 12
- memoryCodeWriter modifications HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jcodemodel.