本文整理汇总了Java中com.intellij.psi.CommonClassNames.JAVA_LANG_OBJECT属性的典型用法代码示例。如果您正苦于以下问题:Java CommonClassNames.JAVA_LANG_OBJECT属性的具体用法?Java CommonClassNames.JAVA_LANG_OBJECT怎么用?Java CommonClassNames.JAVA_LANG_OBJECT使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.psi.CommonClassNames
的用法示例。
在下文中一共展示了CommonClassNames.JAVA_LANG_OBJECT属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkApplicability
@Override
public boolean checkApplicability(@NotNull AnnotationHolder holder, @NotNull GrAnnotation annotation) {
if (GroovyCommonClassNames.GROOVY_TRANSFORM_BASE_SCRIPT.equals(annotation.getQualifiedName())) {
PsiFile file = annotation.getContainingFile();
if (file instanceof GroovyFile && !(((GroovyFile)file).isScript())) {
holder.createErrorAnnotation(annotation, GroovyBundle.message("base.script.annotation.is.allowed.only.inside.scripts"));
return true;
}
PsiElement pparent = annotation.getParent().getParent();
if (pparent instanceof GrVariableDeclaration) {
GrTypeElement typeElement = ((GrVariableDeclaration)pparent).getTypeElementGroovy();
PsiType type = typeElement != null ? typeElement.getType() : null;
if (!InheritanceUtil.isInheritor(type, GroovyCommonClassNames.GROOVY_LANG_SCRIPT)) {
String typeText = type != null ? type.getCanonicalText() : CommonClassNames.JAVA_LANG_OBJECT;
holder.createErrorAnnotation(annotation, GroovyBundle.message("declared.type.0.have.to.extend.script", typeText));
return true;
}
}
}
return false;
}
示例2: getPsi
@Override
@NotNull
public PsiVariable getPsi(PsiManager manager, final String containingClassName) {
if (myPsi != null) return myPsi;
Boolean isStatic = isStatic();
String type = getType();
if (type == null || type.trim().isEmpty()) {
type = CommonClassNames.JAVA_LANG_OBJECT;
}
myPsi = new GrDynamicImplicitProperty(manager, getName(), type, containingClassName);
if (isStatic != null && isStatic.booleanValue()) {
myPsi.getModifierList().addModifier(PsiModifier.STATIC);
}
return myPsi;
}
示例3: getQualifiedClassName
@Override
public String getQualifiedClassName(PsiClass psiClass, @Nullable PsiElement context) {
if (context != null && psiClass != null) {
psiClass = GenerationUtil.findAccessibleSuperClass(context, psiClass);
}
if (psiClass == null) {
return CommonClassNames.JAVA_LANG_OBJECT;
}
final String name = psiClass.getQualifiedName();
if (name != null) return name;
return psiClass.getName();
}
示例4: ReferenceRenderer
protected ReferenceRenderer() {
this(CommonClassNames.JAVA_LANG_OBJECT);
}
示例5: GrBindingVariable
public GrBindingVariable(final GroovyFile file, String name, Boolean isWriteAccess) {
super(file.getManager(), name, CommonClassNames.JAVA_LANG_OBJECT, file);
myFile = file;
myHasWriteAccess = isWriteAccess;
}