Skip to content

Commit df3d8fe

Browse files
committed
Prepared for release
1 parent 0c1fd0d commit df3d8fe

File tree

2 files changed

+26
-7
lines changed

2 files changed

+26
-7
lines changed

README.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
# jcodemodel
22

3-
[![Build Status](https://travis-ci.org/phax/jcodemodel.svg?branch=master)](https://travis-ci.org/phax/jcodemodel)
4-
5-
[![Gitter chat](https://badges.gitter.im/phax/jcodemodel.svg)](https://gitter.im/phax/jcodemodel)
6-
73
A fork of the com.sun.codemodel 2.7-SNAPSHOT.
84
The classes in this project use a different package name `com.helger.jcodemodel` to avoid conflicts
95
with other `com.sun.codemodel` instances that might be floating around in the classpath.
@@ -20,12 +16,14 @@ Add the following to your pom.xml to use this artifact:
2016
<dependency>
2117
<groupId>com.helger</groupId>
2218
<artifactId>jcodemodel</artifactId>
23-
<version>3.4.0</version>
19+
<version>3.4.1</version>
2420
</dependency>
2521
```
2622

2723
# News and noteworthy
2824

25+
* v3.4.1 - 2022-01-20
26+
* Extended `JDefinedClass` API to access the contained enum constants
2927
* v3.4.0 - 2020-05-25
3028
* Added special top-level construct `JResourceDir` to represent pure resource directories ([issue #74](https://github.com/phax/jcodemodel/issues/74) from @guiguilechat)
3129
* Added new class `JCodeModelException` as the base class for `JClassAlreadyExistsException` and the new class `JResourceAlreadyExistsException`
@@ -137,6 +135,27 @@ Add the following to your pom.xml to use this artifact:
137135
* v2.6.4 - 2014-04-10
138136
* 2013-09-23: Changes from https://github.com/UnquietCode/JCodeModel have been incorporated.
139137

138+
## Contribution
139+
140+
Pull requests must follow my personal [Coding Styleguide](https://github.com/phax/meta/blob/master/CodingStyleguide.md)
141+
142+
### Tabs vs spaces
143+
144+
This project uses double-space for indentation. If you want to use tabs, you can ask git to modify the files when commiting them and when pulling them. For this, from your project directory :
145+
146+
- edit the file .git/info/attributes to make it contain `*.java filter=tabspace` . This will tell git to apply the script tabspace on the *.java files
147+
- run `git config filter.tabspace.clean 'expand --tabs=2 --initial'` to ask git to replace tabs with two spaces on commit of *.java files.
148+
- run `git config filter.tabspace.smudge 'unexpand --tabs=2 --first-only'` to request git to replace double spaces with two tabs on checking a *.java file out.
149+
150+
151+
### Eclipse
152+
153+
For eclipse, a formatter xml and a cleanup xml are present in the meta/formatter/eclipse/ directory. You can load them from the "project properties > java code style" settings. Check "Enable project specific settings", then load them.
154+
155+
NOTE : you also need to change the save actions to make them meet the clean up actions. Save actions are done even when they are not present in the clean up.
156+
157+
158+
140159
---
141160

142161
My personal [Coding Styleguide](https://github.com/phax/meta/blob/master/CodingStyleguide.md) |

src/main/java/com/helger/jcodemodel/JDefinedClass.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,12 +343,12 @@ public JEnumConstant enumConstant (@Nonnull final String sName)
343343

344344
/**
345345
* @param sName
346-
* The name of the enum constant to search.
346+
* The name of the enum constant to search. May be <code>null</code>.
347347
* @return The contained {@link JEnumConstant} or <code>null</code>.
348348
* @since 3.4.1
349349
*/
350350
@Nonnull
351-
public final JEnumConstant getEnumConstantByName (@Nullable final String sName)
351+
public final JEnumConstant getEnumConstantOfName (@Nullable final String sName)
352352
{
353353
if (sName == null)
354354
return null;

0 commit comments

Comments
 (0)