本文整理了Java中org.eclipse.jdt.core.Flags.isSynchronized()
方法的一些代码示例,展示了Flags.isSynchronized()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Flags.isSynchronized()
方法的具体详情如下:
包路径:org.eclipse.jdt.core.Flags
类名称:Flags
方法名:isSynchronized
[英]Returns whether the given integer includes the synchronized
modifier.
[中]返回给定整数是否包含synchronized
修饰符。
代码示例来源:origin: eclipse/eclipse.jdt.ls
public static boolean isSynchronized(IMember member) throws JavaModelException{
return Flags.isSynchronized(member.getFlags());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
public static boolean isSynchronized(IMember member) throws JavaModelException{
return Flags.isSynchronized(member.getFlags());
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
public static boolean isSynchronized(IMember member) throws JavaModelException{
return Flags.isSynchronized(member.getFlags());
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation
public static boolean isSynchronized(IMember member) throws JavaModelException{
return Flags.isSynchronized(member.getFlags());
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
boolean isSync= Flags.isSynchronized(flags);
boolean isFinal= Flags.isFinal(flags);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core.manipulation
boolean isSync= Flags.isSynchronized(flags);
boolean isFinal= Flags.isFinal(flags);
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
boolean isSync= Flags.isSynchronized(flags);
boolean isFinal= Flags.isFinal(flags);
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
private ImageDescriptor decorate(ImageDescriptor descriptor, int modifiers, boolean isField) {
int flags= 0;
if (Flags.isDeprecated(modifiers))
flags |= JavaElementImageDescriptor.DEPRECATED;
if (Flags.isStatic(modifiers))
flags |= JavaElementImageDescriptor.STATIC;
if (Flags.isFinal(modifiers))
flags |= JavaElementImageDescriptor.FINAL;
if (Flags.isSynchronized(modifiers))
flags |= JavaElementImageDescriptor.SYNCHRONIZED;
if (Flags.isAbstract(modifiers))
flags |= JavaElementImageDescriptor.ABSTRACT;
if (isField) {
if (Flags.isVolatile(modifiers))
flags |= JavaElementImageDescriptor.VOLATILE;
if (Flags.isTransient(modifiers))
flags |= JavaElementImageDescriptor.TRANSIENT;
}
return new JavaElementImageDescriptor(descriptor, flags, JavaElementImageProvider.SMALL_SIZE);
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_no_native_methods, JavaStatusContext.create(fMethod)));
monitor.worked(1);
if (Flags.isSynchronized(flags))
status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_no_synchronized_methods, JavaStatusContext.create(fMethod)));
monitor.worked(1);
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_no_native_methods, JavaStatusContext.create(fMethod)));
monitor.worked(1);
if (Flags.isSynchronized(flags))
status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_no_synchronized_methods, JavaStatusContext.create(fMethod)));
monitor.worked(1);
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_no_native_methods, JavaStatusContext.create(fMethod)));
monitor.worked(1);
if (Flags.isSynchronized(flags))
status.merge(RefactoringStatus.createFatalErrorStatus(RefactoringCoreMessages.MoveInstanceMethodProcessor_no_synchronized_methods, JavaStatusContext.create(fMethod)));
monitor.worked(1);
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
/**
* Note: This method is for internal use only. Clients should not call this method.
* @param element The element to decorate
* @return Resulting decorations (combination of JavaElementImageDescriptor.IMPLEMENTS
* and JavaElementImageDescriptor.OVERRIDES)
*/
public int computeAdornmentFlags(Object element) {
if (element instanceof IMethod) {
try {
IMethod method= (IMethod) element;
if (!method.getJavaProject().isOnClasspath(method)) {
return 0;
}
int flags= method.getFlags();
if (!method.isConstructor() && !Flags.isPrivate(flags) && !Flags.isStatic(flags)) {
int res= getOverrideIndicators(method);
if (res != 0 && Flags.isSynchronized(flags)) {
return res | JavaElementImageDescriptor.SYNCHRONIZED;
}
return res;
}
} catch (JavaModelException e) {
if (!e.isDoesNotExist()) {
JavaPlugin.log(e);
}
}
}
return 0;
}
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
if (!method.isConstructor() && !Flags.isPrivate(flags) && !Flags.isStatic(flags)) {
int res= getOverrideIndicators(method);
if (res != 0 && Flags.isSynchronized(flags)) {
return res | JavaElementImageDescriptor.SYNCHRONIZED;
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
if (Flags.isSynchronized(flags))
adornments |= JavaElementImageDescriptor.SYNCHRONIZED;
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
if (!method.isConstructor() && !Flags.isPrivate(flags) && !Flags.isStatic(flags)) {
int res= getOverrideIndicators(method);
if (res != 0 && Flags.isSynchronized(flags)) {
return res | JavaElementImageDescriptor.SYNCHRONIZED;
代码示例来源:origin: org.eclipse/org.eclipse.ajdt.ui
if (Flags.isFinal(modifiers) || isInterfaceField(member))
flags |= JavaElementImageDescriptor.FINAL;
if (Flags.isSynchronized(modifiers) && confirmSynchronized(member))
flags |= JavaElementImageDescriptor.SYNCHRONIZED;
if (Flags.isStatic(modifiers) || isInterfaceField(member))
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
if (Flags.isSynchronized(flags))
adornments |= JavaElementImageDescriptor.SYNCHRONIZED;
代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui
if (Flags.isFinal(modifiers) || isInterfaceOrAnnotationField(member) || isEnumConstant(member, modifiers))
flags |= JavaElementImageDescriptor.FINAL;
if (Flags.isSynchronized(modifiers) && confirmSynchronized(member))
flags |= JavaElementImageDescriptor.SYNCHRONIZED;
if (Flags.isStatic(modifiers) || isInterfaceOrAnnotationFieldOrType(member) || isEnumConstant(member, modifiers))
代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui
if (((IMethod)element).isConstructor())
flags|= JavaElementImageDescriptor.CONSTRUCTOR;
if (Flags.isSynchronized(modifiers)) // collides with 'super' flag
flags|= JavaElementImageDescriptor.SYNCHRONIZED;
if (Flags.isNative(modifiers))
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui
if (((IMethod)element).isConstructor())
flags|= JavaElementImageDescriptor.CONSTRUCTOR;
if (Flags.isSynchronized(modifiers)) // collides with 'super' flag
flags|= JavaElementImageDescriptor.SYNCHRONIZED;
if (Flags.isNative(modifiers))
内容来源于网络,如有侵权,请联系作者删除!