本文整理汇总了Java中com.intellij.util.ReflectionUtil.getRawType方法的典型用法代码示例。如果您正苦于以下问题:Java ReflectionUtil.getRawType方法的具体用法?Java ReflectionUtil.getRawType怎么用?Java ReflectionUtil.getRawType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.ReflectionUtil
的用法示例。
在下文中一共展示了ReflectionUtil.getRawType方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: shouldBeShown
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
protected boolean shouldBeShown(final Type type) {
final Map<Class, Boolean> hiders = DomUtil.getFile(getDomElement()).getUserData(TREE_NODES_HIDERS_KEY);
if (type == null || hiders == null || hiders.size() == 0) return true;
final Class aClass = ReflectionUtil.getRawType(type);
List<Class> allParents = new ArrayList<Class>();
for (Map.Entry<Class, Boolean> entry : hiders.entrySet()) {
if (entry.getKey().isAssignableFrom(aClass)) {
allParents.add(entry.getKey());
}
}
if (allParents.size() == 0) return false;
Collections.sort(allParents, INHERITORS_COMPARATOR);
return hiders.get(allParents.get(0)).booleanValue();
}
示例2: isMarkedType
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
protected boolean isMarkedType(Type type, Key<List<Class>> key) {
if (type == null) {
return false;
}
final List<Class> classes = DomUtil.getFile(getDomElement()).getUserData(key);
if (classes != null) {
Class clazz = ReflectionUtil.getRawType(type);
return classes.contains(clazz);
}
return false;
}
示例3: getNodeIcon
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
@Override
public Icon getNodeIcon() {
Class clazz = ReflectionUtil.getRawType(myChildDescription.getType());
// Class arrayClass = Array.newInstance(clazz, 0).getClass();
ElementPresentationTemplate template = myChildDescription.getPresentationTemplate();
if (template != null) {
return template.createPresentation(null).getIcon();
}
return ElementPresentationManager.getIconForClass(clazz);
}
示例4: canNavigate
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
@Override
public boolean canNavigate(DomElement element) {
final Class<DomElement> aClass = (Class<DomElement>)ReflectionUtil.getRawType(myChildDescription.getType());
final DomElement domElement = element.getParentOfType(aClass, false);
return domElement != null && myCollectionElements.contains(domElement);
}
示例5: navigate
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
@Override
public void navigate(DomElement element) {
final Class<DomElement> aClass = (Class<DomElement>)ReflectionUtil.getRawType(myChildDescription.getType());
final DomElement domElement = element.getParentOfType(aClass, false);
int index = myCollectionElements.indexOf(domElement);
if (index < 0) index = 0;
myCollectionPanel.getTable().setRowSelectionInterval(index, index);
}
示例6: createGenericValueControl
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
@NotNull
private static BaseControl createGenericValueControl(final Type type, final GenericDomValue<?> element, boolean commitOnEveryChange) {
final DomStringWrapper stringWrapper = new DomStringWrapper(element);
final Class rawType = ReflectionUtil.getRawType(type);
if (type instanceof Class && Enum.class.isAssignableFrom(rawType)) {
return new ComboControl(stringWrapper, rawType);
}
if (DomElement.class.isAssignableFrom(rawType)) {
final ComboControl control = new ComboControl(element);
final Required annotation = element.getAnnotation(Required.class);
if (annotation == null || !annotation.value() || !annotation.nonEmpty()) {
control.setNullable(true);
}
return control;
}
final DomFixedWrapper wrapper = new DomFixedWrapper(element);
if (type.equals(boolean.class) || type.equals(Boolean.class)) {
return new BooleanControl(wrapper);
}
if (type.equals(String.class)) {
return getDomUIFactory().createTextControl(wrapper, commitOnEveryChange);
}
final BaseControl customControl = getDomUIFactory().createCustomControl(type, stringWrapper, commitOnEveryChange);
if (customControl != null) return customControl;
return getDomUIFactory().createTextControl(stringWrapper, commitOnEveryChange);
}
示例7: calcPresentationTemplate
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
@Nullable
private ElementPresentationTemplate calcPresentationTemplate() {
Class clazz = ReflectionUtil.getRawType(getType());
Presentation presentation = DomApplicationComponent.getInstance().getInvocationCache(clazz).getClassAnnotation(Presentation.class);
return presentation == null ? null : new ElementPresentationTemplateImpl(presentation, clazz);
}
示例8: getColumnClass
import com.intellij.util.ReflectionUtil; //导入方法依赖的package包/类
@Override
public final Class<T> getColumnClass() {
return (Class<T>)ReflectionUtil.getRawType(myChildDescription.getType());
}