Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maximilien CRUZ
committed
Jul 18, 2016
1 parent
c242e8d
commit 9e677ac
Showing
8 changed files
with
52 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 40 additions & 11 deletions
51
javaparser-core/src/main/java/com/github/javaparser/ast/body/Modifier.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,44 @@ | ||
package com.github.javaparser.ast.body; | ||
|
||
import java.util.EnumSet; | ||
|
||
import com.github.javaparser.ast.AccessSpecifier; | ||
|
||
public enum Modifier { | ||
PUBLIC, | ||
PRIVATE, | ||
PROTECTED, | ||
STATIC, | ||
FINAL, | ||
SYNCHRONIZED, | ||
VOLATILE, | ||
TRANSIENT, | ||
NATIVE, | ||
ABSTRACT, | ||
STRICTFP; | ||
PUBLIC("public"), | ||
PRIVATE("private"), | ||
PROTECTED("protected"), | ||
STATIC("static"), | ||
FINAL("final"), | ||
SYNCHRONIZED("synchronized"), | ||
VOLATILE("volatile"), | ||
TRANSIENT("transient"), | ||
NATIVE("native"), | ||
ABSTRACT("abstract"), | ||
STRICTFP("strictfp"); | ||
|
||
String lib; | ||
|
||
private Modifier(String lib) { | ||
this.lib = lib; | ||
} | ||
|
||
/** | ||
* @return the lib | ||
*/ | ||
public String getLib() { | ||
return lib; | ||
} | ||
|
||
public static AccessSpecifier getAccessSpecifier(EnumSet<Modifier> modifiers) { | ||
if (modifiers.contains(Modifier.PUBLIC)) { | ||
return AccessSpecifier.PUBLIC; | ||
} else if (modifiers.contains(Modifier.PROTECTED)) { | ||
return AccessSpecifier.PROTECTED; | ||
} else if (modifiers.contains(Modifier.PRIVATE)) { | ||
return AccessSpecifier.PRIVATE; | ||
} else { | ||
return AccessSpecifier.DEFAULT; | ||
} | ||
} | ||
} |
126 changes: 0 additions & 126 deletions
126
javaparser-core/src/main/java/com/github/javaparser/ast/body/ModifierSet.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters