@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { return annotationInstance.value().asString(); } }
servlet.setServletClass(classInfo.toString()); AnnotationValue nameValue = annotation.value("name"); if (nameValue == null || nameValue.asString().isEmpty()) { servlet.setName(classInfo.toString()); } else { servlet.setName(nameValue.asString()); initParam.setParamName(initParamName.asString()); initParam.setParamValue(initParamValue.asString()); if (initParamDescription != null) { Descriptions descriptions = getDescription(initParamDescription.asString()); if (descriptions != null) { initParam.setDescriptions(descriptions); AnnotationValue largeIconValue = annotation.value("largeIcon"); DescriptionGroupMetaData descriptionGroup = getDescriptionGroup((descriptionValue == null) ? "" : descriptionValue.asString(), (displayNameValue == null) ? "" : displayNameValue.asString(), (smallIconValue == null) ? "" : smallIconValue.asString(), (largeIconValue == null) ? "" : largeIconValue.asString()); if (descriptionGroup != null) { servlet.setDescriptionGroup(descriptionGroup); filter.setFilterClass(classInfo.toString()); AnnotationValue nameValue = annotation.value("filterName"); if (nameValue == null || nameValue.asString().isEmpty()) { filter.setName(classInfo.toString()); } else { filter.setName(nameValue.asString());
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { AnnotationValue value = annotationInstance.value(); if (value == null || value.asString().isEmpty()) { throw EeLogger.ROOT_LOGGER.annotationAttributeMissing("@Pool", "value"); } return propertyReplacer.replaceProperties(value.asString()); } }
public static String asOptionalString(AnnotationInstance annotation, String property, String defaultValue, PropertyReplacer propertyReplacer) { AnnotationValue value = annotation.value(property); if (value == null) { return defaultValue; } else { String valueString = value.asString(); if (valueString.isEmpty()) { return defaultValue; } else { return propertyReplacer != null ? propertyReplacer.replaceProperties(valueString) : valueString; } } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { String resourceAdapterValue = annotationInstance.value().asString(); return propertyReplacer.replaceProperties(resourceAdapterValue); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { return propertyReplacer.replaceProperties(annotationInstance.value().asString()); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { AnnotationValue value = annotationInstance.value(); if (value == null) { return null; } return propertyReplacer.replaceProperties(value.asString()); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { return propertyReplacer.replaceProperties(annotationInstance.value().asString()); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { return propertyReplacer.replaceProperties(annotationInstance.value().asString()); } }
private String stringValueOrNull(final AnnotationInstance annotation, final String attribute) { final AnnotationValue value = annotation.value(attribute); return (value != null) ? propertyReplacer.replaceProperties(value.asString()) : null; }
private Properties getActivationConfigProperties(final AnnotationInstance messageBeanAnnotation, PropertyReplacer propertyReplacer) { final Properties props = new Properties(); final AnnotationValue activationConfig = messageBeanAnnotation.value("activationConfig"); if (activationConfig == null) return props; for (final AnnotationInstance propAnnotation : activationConfig.asNestedArray()) { String propertyName = propAnnotation.value("propertyName").asString(); String propertyValue = propAnnotation.value("propertyValue").asString(); props.put(propertyReplacer.replaceProperties(propertyName), propertyReplacer.replaceProperties(propertyValue)); } return props; }
@Override protected CacheInfo fromAnnotation(AnnotationInstance annotationInstance, PropertyReplacer propertyReplacer) { String value = annotationInstance.value().asString(); return new CacheInfo(propertyReplacer.replaceProperties(value)); } }
public static String asRequiredString(AnnotationInstance annotationInstance, final String attributeName, PropertyReplacer propertyReplacer) { final AnnotationValue nameValue = annotationInstance.value(attributeName); if (nameValue == null) { throw ROOT_LOGGER.annotationAttributeMissing(annotationInstance.name().toString(), attributeName); } final String nameValueAsString = nameValue.asString(); if (nameValueAsString.isEmpty()) { throw ROOT_LOGGER.annotationAttributeMissing(annotationInstance.name().toString(), attributeName); } return propertyReplacer != null ? propertyReplacer.replaceProperties(nameValueAsString) : nameValueAsString; } }
public void set(final AutoTimer timer, final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { final AnnotationValue value = annotationInstance.value(name); if (booleanValue) { if (value == null) { setBoolean(timer, defaultBooleanValue); } else { setBoolean(timer, value.asBoolean()); } } else { if (value == null) { setString(timer, defaultStringValue); } else { setString(timer, propertyReplacer.replaceProperties(value.asString())); } } }
final String beanName = (nameValue == null || nameValue.asString().isEmpty()) ? beanClassName : replacer.replaceProperties(nameValue.asString()); final ManagedBeanComponentDescription componentDescription = new ManagedBeanComponentDescription(beanName, beanClassName, moduleDescription, deploymentUnit.getServiceName());
protected void process(final DeploymentPhaseContext phaseContext, final EEModuleClassDescription classDescription, final AnnotationInstance annotation, final String injectionType, final String localContextName, final InjectionTarget targetDescription, final EEModuleDescription eeModuleDescription, final Module module, final EEApplicationClasses applicationClasses, final PropertyReplacer replacer) throws DeploymentUnitProcessingException { final EEResourceReferenceProcessorRegistry registry = phaseContext.getDeploymentUnit().getAttachment(Attachments.RESOURCE_REFERENCE_PROCESSOR_REGISTRY); final AnnotationValue lookupAnnotation = annotation.value("lookup"); String lookup = (lookupAnnotation == null) ? null : replacer.replaceProperties(lookupAnnotation.asString()); lookup = (mappedNameAnnotationValue == null) ? null : replacer.replaceProperties(mappedNameAnnotationValue.asString());
final String beanName = (nameValue == null || nameValue.asString().isEmpty()) ? ejbName : propertyReplacer.replaceProperties(nameValue.asString()); final MessageDrivenBeanMetaData beanMetaData = getEnterpriseBeanMetaData(deploymentUnit, beanName, MessageDrivenBeanMetaData.class); final String beanClassName;
final String beanName = (nameValue == null || nameValue.asString().isEmpty()) ? ejbName : propertyReplacer.replaceProperties(nameValue.asString()); final SessionBeanMetaData beanMetaData = getEnterpriseBeanMetaData(deploymentUnit, beanName, SessionBeanMetaData.class); final SessionBeanComponentDescription.SessionBeanType sessionBeanType;
final AnnotationTarget annotationTarget = annotation.target(); final AnnotationValue nameValue = annotation.value("name"); final String name = (nameValue != null) ? replacer.replaceProperties(nameValue.asString()) : null; final AnnotationValue typeValue = annotation.value("type"); final String type = typeValue != null ? typeValue.asClass().name().toString() : null; for (AnnotationInstance annotation : values) { final AnnotationValue nameValue = annotation.value("name"); final String name = (nameValue != null) ? replacer.replaceProperties(nameValue.asString()) : null; final AnnotationValue typeValue = annotation.value("type"); final String type = (typeValue != null) ? typeValue.asClass().name().toString() : null;
public static String asRequiredString(AnnotationInstance annotationInstance, final String attributeName, PropertyReplacer propertyReplacer) { final AnnotationValue nameValue = annotationInstance.value(attributeName); if (nameValue == null) { throw ROOT_LOGGER.annotationAttributeMissing(annotationInstance.name().toString(), attributeName); } final String nameValueAsString = nameValue.asString(); if (nameValueAsString.isEmpty()) { throw ROOT_LOGGER.annotationAttributeMissing(annotationInstance.name().toString(), attributeName); } return propertyReplacer != null ? propertyReplacer.replaceProperties(nameValueAsString) : nameValueAsString; } }