Java Code Examples for org.eclipse.jdt.core.dom.TypeDeclaration#getModifiers()
The following examples show how to use
org.eclipse.jdt.core.dom.TypeDeclaration#getModifiers() .
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: JavaASTVisitor.java From SnowGraph with Apache License 2.0 | 5 votes |
private static String getVisibility(TypeDeclaration decl) { int modifiers = decl.getModifiers(); if (Modifier.isPrivate(modifiers)) return "private"; if (Modifier.isProtected(modifiers)) return "protected"; if (Modifier.isPublic(modifiers)) return "public"; return "package"; }
Example 2
Source File: ExtractClassRefactoring.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private boolean shouldParamClassBeStatic(TypeDeclaration enclosingTypeDecl) { if (enclosingTypeDecl.isPackageMemberTypeDeclaration()) { return true; } ITypeBinding binding= enclosingTypeDecl.resolveBinding(); int modifiers= binding != null ? binding.getModifiers() : enclosingTypeDecl.getModifiers(); return Modifier.isStatic(modifiers); }
Example 3
Source File: JavaASTVisitor.java From SnowGraph with Apache License 2.0 | 4 votes |
private static boolean isAbstract(TypeDeclaration decl) { int modifiers = decl.getModifiers(); return (Modifier.isAbstract(modifiers)); }
Example 4
Source File: JavaASTVisitor.java From SnowGraph with Apache License 2.0 | 4 votes |
private static boolean isFinal(TypeDeclaration decl) { int modifiers = decl.getModifiers(); return (Modifier.isFinal(modifiers)); }