本文整理汇总了Java中com.intellij.util.xml.Required类的典型用法代码示例。如果您正苦于以下问题:Java Required类的具体用法?Java Required怎么用?Java Required使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Required类属于com.intellij.util.xml包,在下文中一共展示了Required类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
});
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:MavenPluginConfigurationDomExtender.java
示例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();
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:12,代码来源:Property.java
示例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);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:DomUIFactory.java
示例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();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DomAttributeXmlDescriptor.java
示例5: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@NotNull
@Required
@Referencing(RngReferenceConverter.class)
GenericAttributeValue<String> getName();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:RngRef.java
示例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();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:RngInclude.java
示例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();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:RngExternalRef.java
示例8: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Override
@Required
@Convert(ResourceNameConverter.class)
GenericAttributeValue<String> getName();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:Style.java
示例9: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
@Convert(ResourceNameConverter.class)
GenericAttributeValue<String> getName();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ResourceElement.java
示例10: getQuantity
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Convert(QuantityConverter.class)
@Required
GenericAttributeValue<String> getQuantity();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PluralsItem.java
示例11: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
AndroidAttributeValue<String> getName();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:ManifestElementWithRequiredName.java
示例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();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:Instrumentation.java
示例13: getTargetPackage
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
@Attribute("targetPackage")
@Convert(InstrumentationTargetPackageConverter.class)
AndroidAttributeValue<String> getTargetPackage();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:Instrumentation.java
示例14: getActivityClass
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Attribute("name")
@Required
@Convert(PackageClassConverter.class)
@ExtendClass("android.app.Activity")
AndroidAttributeValue<PsiClass> getActivityClass();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:Activity.java
示例15: getTargetActivity
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Required
@Convert(value = PackageClassConverter.class)
@ExtendClass("android.app.Activity")
@Attribute("targetActivity")
AndroidAttributeValue<PsiClass> getTargetActivity();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ActivityAlias.java
示例16: getName
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Attribute("name")
@Required
@Convert(ConstantFieldConverter.class)
@LookupClass("android.Manifest.permission")
@LookupPrefix("android.permission")
AndroidAttributeValue<String> getName();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:7,代码来源:UsesPermission.java
示例17: getToScene
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Attribute("toScene")
@Convert(ResourceReferenceConverter.class)
@Required
@AndroidResourceType("layout")
AndroidAttributeValue<ResourceValue> getToScene();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:TransitionManager.java
示例18: getColor
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Convert(ResourceReferenceConverter.class)
@AndroidResourceType("color")
@Required
AndroidAttributeValue<ResourceValue> getColor();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:ColorDrawable.java
示例19: getFromId
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Convert(ResourceReferenceConverter.class)
@AndroidResourceType("id")
@Attribute("fromId") // without this it's interpreted as "from-id"
@Required
AndroidAttributeValue<ResourceValue> getFromId();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:AnimatedStateListTransition.java
示例20: getToId
import com.intellij.util.xml.Required; //导入依赖的package包/类
@Convert(ResourceReferenceConverter.class)
@AndroidResourceType("id")
@Attribute("toId") // without this it's interpreted as "to-id"
@Required
AndroidAttributeValue<ResourceValue> getToId();
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:AnimatedStateListTransition.java
注:本文中的com.intellij.util.xml.Required类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论