@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { AnnotationValue value = annotationInstance.value(); return value.asClass().toString(); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) { AnnotationValue value = annotationInstance.value(); return value.asClass().toString(); } }
private String classValueOrNull(final AnnotationInstance annotation, final String attribute) { final AnnotationValue value = annotation.value(attribute); return (value != null) ? value.asClass().name().toString() : null; } }
private String getMessageListenerInterface(final CompositeIndex compositeIndex, final AnnotationInstance messageBeanAnnotation) throws DeploymentUnitProcessingException { final AnnotationValue value = messageBeanAnnotation.value("messageListenerInterface"); if (value != null) return value.asClass().name().toString(); final ClassInfo beanClass = (ClassInfo) messageBeanAnnotation.target(); final Set<DotName> interfaces = new HashSet<DotName>(getPotentialViewInterfaces(beanClass)); // check super class(es) of the bean DotName superClassDotName = beanClass.superName(); while (interfaces.isEmpty() && superClassDotName != null && !superClassDotName.toString().equals(Object.class.getName())) { final ClassInfo superClass = compositeIndex.getClassByName(superClassDotName); if (superClass == null) { break; } interfaces.addAll(getPotentialViewInterfaces(superClass)); // move to next super class superClassDotName = superClass.superName(); } if (interfaces.size() != 1) throw EjbLogger.ROOT_LOGGER.mdbDoesNotImplementNorSpecifyMessageListener(beanClass); return interfaces.iterator().next().toString(); }
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; if (annotationTarget instanceof FieldInfo) { final FieldInfo fieldInfo = (FieldInfo) annotationTarget; 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; EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString()); processClassResource(phaseContext, name, type, classDescription, annotation, eeModuleDescription, module, applicationClasses, replacer);
public Type[] asClassArray() { int length = value.length; Type[] array = new Type[length]; for (int i = 0; i < length; i++) { array[i] = value[i].asClass(); } return array; }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance) { AnnotationValue value = annotationInstance.value(); return value.asClass().toString(); } }
@Override protected String fromAnnotation(final AnnotationInstance annotationInstance) { AnnotationValue value = annotationInstance.value(); return value.asClass().toString(); } }
private String classValueOrNull(final AnnotationInstance annotation, final String attribute) { final AnnotationValue value = annotation.value(attribute); return value != null ? value.asClass().name().toString() : null; } }
private String classValueOrNull(final AnnotationInstance annotation, final String attribute) { final AnnotationValue value = annotation.value(attribute); return value != null ? value.asClass().name().toString() : null; } }
private String classValueOrNull(final AnnotationInstance annotation, final String attribute) { final AnnotationValue value = annotation.value(attribute); return value != null ? value.asClass().name().toString() : null; } }
private String classValueOrNull(final AnnotationInstance annotation, final String attribute) { final AnnotationValue value = annotation.value(attribute); return value != null ? value.asClass().name().toString() : null; } }
private String getMessageListenerInterface(final CompositeIndex compositeIndex, final AnnotationInstance messageBeanAnnotation) throws DeploymentUnitProcessingException { final AnnotationValue value = messageBeanAnnotation.value("messageListenerInterface"); if (value != null) return value.asClass().name().toString(); final ClassInfo beanClass = (ClassInfo) messageBeanAnnotation.target(); final Set<DotName> interfaces = new HashSet<DotName>(getPotentialViewInterfaces(beanClass)); // check super class(es) of the bean DotName superClassDotName = beanClass.superName(); while (interfaces.isEmpty() && superClassDotName != null && !superClassDotName.toString().equals(Object.class.getName())) { final ClassInfo superClass = compositeIndex.getClassByName(superClassDotName); if (superClass == null) { break; } interfaces.addAll(getPotentialViewInterfaces(superClass)); // move to next super class superClassDotName = superClass.superName(); } if (interfaces.size() != 1) throw MESSAGES.mdbDoesNotImplementNorSpecifyMessageListener(beanClass); return interfaces.iterator().next().toString(); }
private String determineReferencedEntityType(AnnotationInstance associationAnnotation) { String targetTypeName = getAttributeType().getName(); AnnotationInstance targetAnnotation = JandexHelper.getSingleAnnotation( annotations(), HibernateDotNames.TARGET ); if ( targetAnnotation != null ) { targetTypeName = targetAnnotation.value().asClass().name().toString(); } AnnotationValue targetEntityValue = associationAnnotation.value( "targetEntity" ); if ( targetEntityValue != null ) { targetTypeName = targetEntityValue.asClass().name().toString(); } return targetTypeName; }
private String determineReferencedEntityType(AnnotationInstance associationAnnotation) { String targetTypeName = getAttributeType().getName(); AnnotationInstance targetAnnotation = JandexHelper.getSingleAnnotation( annotations(), HibernateDotNames.TARGET ); if ( targetAnnotation != null ) { targetTypeName = targetAnnotation.value().asClass().name().toString(); } AnnotationValue targetEntityValue = associationAnnotation.value( "targetEntity" ); if ( targetEntityValue != null ) { targetTypeName = targetEntityValue.asClass().name().toString(); } return targetTypeName; }
private void buildAValueEntries(AnnotationValue value) { addString(value.name()); if (value instanceof AnnotationValue.StringValue) { addString(value.asString()); } else if (value instanceof AnnotationValue.ClassValue) { addType(value.asClass()); } else if (value instanceof AnnotationValue.EnumValue) { addClassName(value.asEnumType()); addString(value.asEnum()); } else if (value instanceof AnnotationValue.ArrayValue) { for (AnnotationValue entry : value.asArray()) buildAValueEntries(entry); } else if (value instanceof AnnotationValue.NestedAnnotation) { AnnotationInstance instance = value.asNested(); addAnnotation(instance); } }
private void buildAValueEntries(Index index, AnnotationValue value) { intern(value.name()); if (value instanceof AnnotationValue.StringValue) { intern(value.asString()); } else if (value instanceof AnnotationValue.ClassValue) { addClassName(value.asClass().name()); } else if (value instanceof AnnotationValue.EnumValue) { addClassName(value.asEnumType()); intern(value.asEnum()); } else if (value instanceof AnnotationValue.ArrayValue) { for (AnnotationValue entry : value.asArray()) buildAValueEntries(index, entry); } else if (value instanceof AnnotationValue.NestedAnnotation) { AnnotationInstance instance = value.asNested(); Collection<AnnotationValue> values = instance.values(); addClassName(instance.name()); for (AnnotationValue entry : values) { buildAValueEntries(index, entry); } } }
final String name = nameValue != null ? nameValue.asString() : null; final AnnotationValue typeValue = annotation.value("type"); final String type = typeValue != null ? typeValue.asClass().name().toString() : null; if (annotationTarget instanceof FieldInfo) { final FieldInfo fieldInfo = (FieldInfo) annotationTarget; final String name = nameValue != null ? nameValue.asString() : null; final AnnotationValue typeValue = annotation.value("type"); final String type = typeValue != null ? typeValue.asClass().name().toString() : null; EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString()); processClassResource(phaseContext, name, type, classDescription, annotation, eeModuleDescription, module, applicationClasses);
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; if (annotationTarget instanceof FieldInfo) { final FieldInfo fieldInfo = (FieldInfo) annotationTarget; 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; EEModuleClassDescription classDescription = eeModuleDescription.addOrGetLocalClassDescription(classInfo.name().toString()); processClassResource(phaseContext, name, type, classDescription, annotation, eeModuleDescription, module, applicationClasses, replacer);
} else if (value instanceof AnnotationValue.ClassValue) { stream.writeByte(AVALUE_CLASS); writeType(stream, value.asClass()); } else if (value instanceof AnnotationValue.EnumValue) { stream.writeByte(AVALUE_ENUM);