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

How to use
equals
method
in
org.jboss.jandex.DotName

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

origin: wildfly/wildfly

@Override
public boolean equals(Object obj) {
  if (this == obj) {
    return true;
  }
  if (obj instanceof AnnotationType) {
    AnnotationType that = (AnnotationType) obj;
    return this.name.equals(that.name);
  }
  return false;
}
origin: wildfly/wildfly

  return true;
if (OBJECT_NAME.equals(name)) {
  return false; // there's nothing assignable from Object.class except for Object.class
origin: wildfly/wildfly

private boolean containsAnnotation(ClassInfo classInfo, DotName requiredAnnotationName, Class<? extends Annotation> requiredAnnotation) {
  // Type and members
  if (classInfo.annotations().containsKey(requiredAnnotationName)) {
    return true;
  }
  // Meta-annotations
  for (DotName annotation : classInfo.annotations().keySet()) {
    if (annotationClassAnnotationsCache.getValue(annotation).contains(requiredAnnotationName.toString())) {
      return true;
    }
  }
  // Superclass
  final DotName superName = classInfo.superName();
  if (superName != null && !OBJECT_NAME.equals(superName)) {
    final ClassInfo superClassInfo = index.getClassByName(superName);
    if (superClassInfo == null) {
      // we are accessing a class that is outside of the jandex index
      // fallback to using reflection
      return Reflections.containsAnnotation(loadClass(superName.toString()), requiredAnnotation);
    }
    if (containsAnnotation(superClassInfo, requiredAnnotationName, requiredAnnotation)) {
      return true;
    }
  }
  return false;
}
origin: wildfly/jandex

/**
 * Returns whether or not this annotation instance is equivalent to another instance.
 * An annotation instance is equivalent if its name and values are equal, and it shares
 * the exact same <code>AnnotationTarget</code> instance. The latter restriction
 * may be softened in future versions.
 *
 * @param o the annotation instance to compare to.
 * @return true if equal, false if not
 *
 * @see Object#equals(Object)
 */
@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (o == null || getClass() != o.getClass()) return false;
  AnnotationInstance instance = (AnnotationInstance) o;
  return target == instance.target && name.equals(instance.name) && Arrays.equals(values, instance.values);
}
origin: wildfly/jandex

/**
 * Compares this Type with another type, and returns true if they are equivalent.
 * A type is equivalent to another type if it is the same kind, and all of its
 * fields are equal. This includes annotations, which must be equal as well.
 *
 * @param o the type to compare to
 * @return true if equal
 * @see Object#equals(Object)
 */
@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  Type type = (Type) o;
  return name.equals(type.name) && Arrays.equals(annotations, type.annotations);
}
origin: wildfly/jandex

@Override
public boolean equals(Object o) {
  if (this == o) {
    return true;
  }
  if (o == null || getClass() != o.getClass()) {
    return false;
  }
  EnumValue enumValue = (EnumValue) o;
  return super.equals(o) && typeName.equals(enumValue.typeName) && value.equals(enumValue.value);
}
origin: org.jboss.eap/wildfly-webservices-server-integration

public static boolean isJaxwsService(final ClassInfo current, final CompositeIndex index) {
  ClassInfo tmp = current;
  while (tmp != null) {
    final DotName superName = tmp.superName();
    if (JAXWS_SERVICE_CLASS.equals(superName)) {
      return true;
    }
    tmp = index.getClassByName(superName);
  }
  return false;
}
origin: org.wildfly/wildfly-webservices-server-integration

public static boolean isJaxwsService(final ClassInfo current, final CompositeIndex index) {
  ClassInfo tmp = current;
  while (tmp != null) {
    final DotName superName = tmp.superName();
    if (JAXWS_SERVICE_CLASS.equals(superName)) {
      return true;
    }
    tmp = index.getClassByName(superName);
  }
  return false;
}
origin: org.wildfly/wildfly-webservices-server-integration

public static boolean isJaxwsService(final ClassInfo current, final Index index) {
  ClassInfo tmp = current;
  while (tmp != null) {
    final DotName superName = tmp.superName();
    if (JAXWS_SERVICE_CLASS.equals(superName)) {
      return true;
    }
    tmp = index.getClassByName(superName);
  }
  return false;
}
origin: org.jboss.as/jboss-as-webservices-server-integration

public static boolean isJaxwsService(final ClassInfo current, final Index index) {
  ClassInfo tmp = current;
  while (tmp != null) {
    final DotName superName = tmp.superName();
    if (JAXWS_SERVICE_CLASS.equals(superName)) {
      return true;
    }
    tmp = index.getClassByName(superName);
  }
  return false;
}
origin: org.jboss.eap/wildfly-webservices-server-integration

public static boolean isJaxwsService(final ClassInfo current, final Index index) {
  ClassInfo tmp = current;
  while (tmp != null) {
    final DotName superName = tmp.superName();
    if (JAXWS_SERVICE_CLASS.equals(superName)) {
      return true;
    }
    tmp = index.getClassByName(superName);
  }
  return false;
}
origin: org.jboss.as/jboss-as-webservices-server-integration

public static boolean isJaxwsService(final ClassInfo current, final CompositeIndex index) {
  ClassInfo tmp = current;
  while (tmp != null) {
    final DotName superName = tmp.superName();
    if (JAXWS_SERVICE_CLASS.equals(superName)) {
      return true;
    }
    tmp = index.getClassByName(superName);
  }
  return false;
}
origin: wildfly/jandex

private void processInnerClasses(DataInputStream data, ClassInfo target) throws IOException {
  int numClasses = data.readUnsignedShort();
  innerClasses = numClasses > 0 ? new HashMap<DotName, InnerClassInfo>(numClasses)
                 : Collections.<DotName, InnerClassInfo>emptyMap();
  for (int i = 0; i < numClasses; i++) {
    DotName innerClass = decodeClassEntry(data.readUnsignedShort());
    int outerIndex = data.readUnsignedShort();
    DotName outerClass = outerIndex == 0 ? null : decodeClassEntry(outerIndex);
    int simpleIndex = data.readUnsignedShort();
    String simpleName = simpleIndex == 0 ? null : decodeUtf8Entry(simpleIndex);
    int flags = data.readUnsignedShort();
    if (innerClass.equals(target.name())) {
      target.setInnerClassInfo(outerClass, simpleName);
      target.setFlags((short)flags);
    }
    innerClasses.put(innerClass, new InnerClassInfo(innerClass, outerClass, simpleName, flags));
  }
}
origin: org.hibernate/com.springsource.org.hibernate

public ColumnValues(AnnotationInstance columnAnnotation) {
  if ( columnAnnotation != null && !JPADotNames.COLUMN.equals( columnAnnotation.name() ) ) {
    throw new AssertionFailure( "A @Column annotation needs to be passed to the constructor" );
  }
  applyColumnValues( columnAnnotation );
}
origin: org.hibernate/com.springsource.org.hibernate.core

private static void addMappedSuperclasses(Index index, ClassInfo info, List<ClassInfo> classInfoList) {
  DotName superName = info.superName();
  ClassInfo tmpInfo;
  // walk up the hierarchy until java.lang.Object
  while ( !OBJECT.equals( superName ) ) {
    tmpInfo = index.getClassByName( superName );
    if ( isMappedSuperclass( tmpInfo ) ) {
      classInfoList.add( tmpInfo );
    }
    superName = tmpInfo.superName();
  }
}
origin: org.hibernate/com.springsource.org.hibernate

private static void addMappedSuperclasses(Index index, ClassInfo info, List<ClassInfo> classInfoList) {
  DotName superName = info.superName();
  ClassInfo tmpInfo;
  // walk up the hierarchy until java.lang.Object
  while ( !OBJECT.equals( superName ) ) {
    tmpInfo = index.getClassByName( superName );
    if ( isMappedSuperclass( tmpInfo ) ) {
      classInfoList.add( tmpInfo );
    }
    superName = tmpInfo.superName();
  }
}
origin: org.hibernate/com.springsource.org.hibernate.core

public ColumnValues(AnnotationInstance columnAnnotation) {
  if ( columnAnnotation != null && !JPADotNames.COLUMN.equals( columnAnnotation.name() ) ) {
    throw new AssertionFailure( "A @Column annotation needs to be passed to the constructor" );
  }
  applyColumnValues( columnAnnotation );
}
origin: org.hibernate/com.springsource.org.hibernate.core

public AttributeOverride(String prefix, AnnotationInstance attributeOverrideAnnotation) {
  if ( attributeOverrideAnnotation == null ) {
    throw new IllegalArgumentException( "An AnnotationInstance needs to be passed" );
  }
  if ( !JPADotNames.ATTRIBUTE_OVERRIDE.equals( attributeOverrideAnnotation.name() ) ) {
    throw new AssertionFailure( "A @AttributeOverride annotation needs to be passed to the constructor" );
  }
  columnValues = new ColumnValues(
      JandexHelper.getValue(
          attributeOverrideAnnotation,
          "column",
          AnnotationInstance.class
      )
  );
  attributePath = createAttributePath(
      prefix,
      JandexHelper.getValue( attributeOverrideAnnotation, "name", String.class )
  );
}
origin: org.hibernate/com.springsource.org.hibernate

protected AccessType getAccessFromIndex(DotName className) {
  Map<DotName, List<AnnotationInstance>> indexedAnnotations = indexBuilder.getIndexedAnnotations( className );
  List<AnnotationInstance> accessAnnotationInstances = indexedAnnotations.get( ACCESS );
  if ( MockHelper.isNotEmpty( accessAnnotationInstances ) ) {
    for ( AnnotationInstance annotationInstance : accessAnnotationInstances ) {
      if ( annotationInstance.target() != null && annotationInstance.target() instanceof ClassInfo ) {
        ClassInfo ci = (ClassInfo) ( annotationInstance.target() );
        if ( className.equals( ci.name() ) ) {
          //todo does ci need to have @Entity or @MappedSuperClass ??
          return AccessType.valueOf( annotationInstance.value().asEnum() );
        }
      }
    }
  }
  return null;
}
origin: org.hibernate/com.springsource.org.hibernate.core

protected AccessType getAccessFromIndex(DotName className) {
  Map<DotName, List<AnnotationInstance>> indexedAnnotations = indexBuilder.getIndexedAnnotations( className );
  List<AnnotationInstance> accessAnnotationInstances = indexedAnnotations.get( ACCESS );
  if ( MockHelper.isNotEmpty( accessAnnotationInstances ) ) {
    for ( AnnotationInstance annotationInstance : accessAnnotationInstances ) {
      if ( annotationInstance.target() != null && annotationInstance.target() instanceof ClassInfo ) {
        ClassInfo ci = (ClassInfo) ( annotationInstance.target() );
        if ( className.equals( ci.name() ) ) {
          //todo does ci need to have @Entity or @MappedSuperClass ??
          return AccessType.valueOf( annotationInstance.value().asEnum() );
        }
      }
    }
  }
  return null;
}
org.jboss.jandexDotNameequals

Javadoc

Compares a DotName to another DotName and returns true if the represent the same underlying semantic name. In other words, whether or not a name is componentized or simple has no bearing on the comparison.

Popular methods of DotName

  • createSimple
  • toString
  • local
  • createComponentized
  • isComponentized
  • prefix
  • hashCode
    Returns a hash code which is based on the semantic representation of this DotName. Whether or not a
  • isInner
    Returns whether the local portion of this DotName represents an inner class.
  • <init>
  • compareTo
    Compares a DotName to another DotName and returns whether this DotName is lesser than, greater than,
  • crossEquals
  • nextChar
  • crossEquals,
  • nextChar

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • scheduleAtFixedRate (Timer)
  • runOnUiThread (Activity)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • 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