congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AnnotationValue.asClass
Code IndexAdd Tabnine to your IDE (free)

How to use
asClass
method
in
org.jboss.jandex.AnnotationValue

Best Java code snippets using org.jboss.jandex.AnnotationValue.asClass (Showing top 20 results out of 315)

origin: wildfly/wildfly

  @Override
  protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
    AnnotationValue value = annotationInstance.value();
    return value.asClass().toString();
  }
}
origin: wildfly/wildfly

  @Override
  protected String fromAnnotation(final AnnotationInstance annotationInstance, final PropertyReplacer propertyReplacer) {
    AnnotationValue value = annotationInstance.value();
    return value.asClass().toString();
  }
}
origin: wildfly/wildfly

  private String classValueOrNull(final AnnotationInstance annotation, final String attribute) {
    final AnnotationValue value = annotation.value(attribute);
    return (value != null) ? value.asClass().name().toString() : null;
  }
}
origin: wildfly/wildfly

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();
}
origin: wildfly/wildfly

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);
origin: wildfly/jandex

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;
}
origin: org.jboss.as/jboss-as-ejb3

  @Override
  protected String fromAnnotation(final AnnotationInstance annotationInstance) {
    AnnotationValue value = annotationInstance.value();
    return value.asClass().toString();
  }
}
origin: org.jboss.as/jboss-as-ejb3

  @Override
  protected String fromAnnotation(final AnnotationInstance annotationInstance) {
    AnnotationValue value = annotationInstance.value();
    return value.asClass().toString();
  }
}
origin: org.wildfly/wildfly-webservices-server-integration

  private String classValueOrNull(final AnnotationInstance annotation, final String attribute) {
    final AnnotationValue value = annotation.value(attribute);
    return value != null ? value.asClass().name().toString() : null;
  }
}
origin: org.jboss.as/jboss-as-ejb3

  private String classValueOrNull(final AnnotationInstance annotation, final String attribute) {
    final AnnotationValue value = annotation.value(attribute);
    return value != null ? value.asClass().name().toString() : null;
  }
}
origin: org.jboss.as/jboss-as-webservices-server-integration

  private String classValueOrNull(final AnnotationInstance annotation, final String attribute) {
    final AnnotationValue value = annotation.value(attribute);
    return value != null ? value.asClass().name().toString() : null;
  }
}
origin: org.jboss.eap/wildfly-webservices-server-integration

  private String classValueOrNull(final AnnotationInstance annotation, final String attribute) {
    final AnnotationValue value = annotation.value(attribute);
    return value != null ? value.asClass().name().toString() : null;
  }
}
origin: org.jboss.as/jboss-as-ejb3

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();
}
origin: org.hibernate/com.springsource.org.hibernate

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;
}
origin: org.hibernate/com.springsource.org.hibernate.core

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;
}
origin: wildfly/jandex

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);
  }
}
origin: wildfly/jandex

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);
    }
  }
}
origin: org.jboss.as/jboss-as-ee

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);
origin: org.jboss.eap/wildfly-ee

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);
origin: wildfly/jandex

} else if (value instanceof AnnotationValue.ClassValue) {
  stream.writeByte(AVALUE_CLASS);
  writeType(stream, value.asClass());
} else if (value instanceof AnnotationValue.EnumValue) {
  stream.writeByte(AVALUE_ENUM);
org.jboss.jandexAnnotationValueasClass

Javadoc

Returns the class name, in Type form, that represents a Java Class used by this value. In addition to standard class name, it can also refer to specialty types, such as Void and primitive types (e.g. int.class). More specifically, any erased type that a method can return is a valid annotation Class type.

Popular methods of AnnotationValue

  • asString
  • asBoolean
  • asNestedArray
  • asStringArray
  • asInt
  • value
  • asEnum
  • asClassArray
  • asLong
  • asEnumArray
  • asNested
  • toString
  • asNested,
  • toString,
  • createArrayValue,
  • createBooleanValue,
  • createClassValue,
  • createEnumValue,
  • createIntegerValue,
  • createNestedAnnotationValue,
  • createStringValue

Popular in Java

  • Reactive rest calls using spring rest template
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • compareTo (BigDecimal)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now