本文整理汇总了Java中com.intellij.util.xml.Required类的典型用法代码示例。如果您正苦于以下问题:Java Required类的具体用法?Java Required怎么用?Java Required使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Required类属于com.intellij.util.xml包,在下文中一共展示了Required类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: addRequiredAnnotation
import com.intellij.util.xml.Required; //导入依赖的package包/类
private static void addRequiredAnnotation(DomExtension e, final ParameterData data) {
if (Boolean.parseBoolean(data.parameter.getRequired().getStringValue())
&& StringUtil.isEmptyOrSpaces(data.defaultValue)
&& StringUtil.isEmptyOrSpaces(data.expression)) {
e.addCustomAnnotation(new Required(){
@Override
public boolean value() {
return true;
}
@Override
public boolean nonEmpty() {
return false;
}
@Override
public boolean identifier() {
return false;
}
public Class<? extends Annotation> annotationType() {
return Required.class;
}
});
}
}
示例2: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
/**
* Returns the value of the name child.
*
* @return the value of the name child.
*/
@NotNull
@Required
//NOTE: We have to avoid @Convert since PsiField is in the read-only file and thus can't be renamed by platform
//NOTE: Instead we are renaming the attribute value itself, see BeansRenamePsiElementProcessor
//@Convert(soft = true, value = BeansPropertyNameConverter.class)
GenericAttributeValue<String> getName();
示例3: createGenericValueControl
import com.intellij.util.xml.Required; //导入依赖的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);
}
示例4: isRequired
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Override
public boolean isRequired() {
final Required required = myDescription.getAnnotation(Required.class);
return required != null && required.value();
}
示例5: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@NotNull
@Required
@Referencing(RngReferenceConverter.class)
GenericAttributeValue<String> getName();
示例6: getIncludedFile
import com.intellij.util.xml.Required; //导入依赖的package包/类
/**
* Returns the value of the href child.
*
* @return the value of the href child.
*/
@NotNull
@Required
@Convert(RngHrefConverter.class)
@com.intellij.util.xml.Attribute("href")
GenericAttributeValue<XmlFile> getIncludedFile();
示例7: getReferencedFile
import com.intellij.util.xml.Required; //导入依赖的package包/类
/**
* Returns the value of the href child.
*
* @return the value of the href child.
*/
@NotNull
@Required
@Convert(RngHrefConverter.class)
@com.intellij.util.xml.Attribute("href")
GenericAttributeValue<XmlFile> getReferencedFile();
示例8: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Override
@Required
@Convert(ResourceNameConverter.class)
GenericAttributeValue<String> getName();
示例9: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
@Convert(ResourceNameConverter.class)
GenericAttributeValue<String> getName();
示例10: getQuantity
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Convert(QuantityConverter.class)
@Required
GenericAttributeValue<String> getQuantity();
示例11: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
AndroidAttributeValue<String> getName();
示例12: getInstrumentationClass
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Attribute("name")
@Required
@Convert(PackageClassConverter.class)
@CompleteNonModuleClass
@ExtendClass(AndroidUtils.INSTRUMENTATION_RUNNER_BASE_CLASS)
AndroidAttributeValue<PsiClass> getInstrumentationClass();
示例13: getTargetPackage
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
@Attribute("targetPackage")
@Convert(InstrumentationTargetPackageConverter.class)
AndroidAttributeValue<String> getTargetPackage();
示例14: getActivityClass
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Attribute("name")
@Required
@Convert(PackageClassConverter.class)
@ExtendClass("android.app.Activity")
AndroidAttributeValue<PsiClass> getActivityClass();
示例15: getTargetActivity
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
@Convert(value = PackageClassConverter.class)
@ExtendClass("android.app.Activity")
@Attribute("targetActivity")
AndroidAttributeValue<PsiClass> getTargetActivity();