Java Code Examples for org.eclipse.xtext.common.types.JvmMember#setVisibility()
The following examples show how to use
org.eclipse.xtext.common.types.JvmMember#setVisibility() .
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: Proxies.java From xtext-extras with Eclipse Public License 2.0 | 6 votes |
public void setVisibility(int accessFlags, JvmMember result) { switch (accessFlags & (ACC_PRIVATE | ACC_PROTECTED | ACC_PUBLIC)) { case ACC_PRIVATE: result.setVisibility(JvmVisibility.PRIVATE); return; case ACC_PROTECTED: result.setVisibility(JvmVisibility.PROTECTED); return; case ACC_PUBLIC: result.setVisibility(JvmVisibility.PUBLIC); return; default: result.setVisibility(JvmVisibility.DEFAULT); return; } }
Example 2
Source File: JvmAnnotationTargetBuilder.java From xtext-extras with Eclipse Public License 2.0 | 6 votes |
protected void setVisibility(int accessFlags, JvmMember result) { switch (accessFlags & (ACC_PRIVATE | ACC_PROTECTED | ACC_PUBLIC)) { case ACC_PRIVATE: result.setVisibility(JvmVisibility.PRIVATE); return; case ACC_PROTECTED: result.setVisibility(JvmVisibility.PROTECTED); return; case ACC_PUBLIC: result.setVisibility(JvmVisibility.PUBLIC); return; default: result.setVisibility(JvmVisibility.DEFAULT); return; } }
Example 3
Source File: ReflectionTypeFactory.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected void setVisibility(Class<?> clazz, JvmMember result) { if (Modifier.isPrivate(clazz.getModifiers())) result.setVisibility(JvmVisibility.PRIVATE); else if (Modifier.isProtected(clazz.getModifiers())) result.setVisibility(JvmVisibility.PROTECTED); else if (Modifier.isPublic(clazz.getModifiers())) result.setVisibility(JvmVisibility.PUBLIC); }
Example 4
Source File: JdtBasedTypeFactory.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected void setVisibility(JvmMember result, int modifiers) { if (Modifier.isPrivate(modifiers)) result.setVisibility(JvmVisibility.PRIVATE); else if (Modifier.isProtected(modifiers)) result.setVisibility(JvmVisibility.PROTECTED); else if (Modifier.isPublic(modifiers)) result.setVisibility(JvmVisibility.PUBLIC); else result.setVisibility(JvmVisibility.DEFAULT); }
Example 5
Source File: SARLJvmModelInferrer.java From sarl with Apache License 2.0 | 5 votes |
private void setVisibility(JvmMember jvmMember, XtendMember member) { JvmVisibility visibility = member.getVisibility(); if (visibility == null) { visibility = this.defaultVisibilityProvider.getDefaultJvmVisibility(member); } jvmMember.setVisibility(visibility); }