Java Code Examples for org.eclipse.jdt.core.dom.Modifier#getKeyword()
The following examples show how to use
org.eclipse.jdt.core.dom.Modifier#getKeyword() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ModifierCorrectionSubProcessor.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 5 votes |
private static Modifier findVisibilityModifier(List<IExtendedModifier> modifiers) { for (int i = 0; i < modifiers.size(); i++) { IExtendedModifier curr = modifiers.get(i); if (curr instanceof Modifier) { Modifier modifier = (Modifier) curr; ModifierKeyword keyword = modifier.getKeyword(); if (keyword == ModifierKeyword.PUBLIC_KEYWORD || keyword == ModifierKeyword.PROTECTED_KEYWORD || keyword == ModifierKeyword.PRIVATE_KEYWORD) { return modifier; } } } return null; }
Example 2
Source File: ModifierCorrectionSubProcessor.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private static Modifier findVisibilityModifier(List<IExtendedModifier> modifiers) { for (int i= 0; i < modifiers.size(); i++) { IExtendedModifier curr= modifiers.get(i); if (curr instanceof Modifier) { Modifier modifier= (Modifier) curr; ModifierKeyword keyword= modifier.getKeyword(); if (keyword == ModifierKeyword.PUBLIC_KEYWORD || keyword == ModifierKeyword.PROTECTED_KEYWORD || keyword == ModifierKeyword.PRIVATE_KEYWORD) { return modifier; } } } return null; }