Package javax.lang.model.element

Examples of javax.lang.model.element.Name


        }
    }

    @Override
    public Void visitEndElement(EndElementTree tree, Void ignore) {
        final Name treeName = tree.getName();
        final HtmlTag t = HtmlTag.get(treeName);
        if (t == null) {
            env.messages.error(HTML, tree, "dc.tag.unknown", treeName);
        } else if (t.endKind == HtmlTag.EndKind.NONE) {
            env.messages.error(HTML, tree, "dc.tag.end.not.permitted", treeName);
View Full Code Here


            if (tsi.tag.flags.contains(HtmlTag.Flag.EXPECT_CONTENT)
                    && !tsi.flags.contains(Flag.HAS_TEXT)
                    && !tsi.flags.contains(Flag.HAS_ELEMENT)
                    && !tsi.flags.contains(Flag.HAS_INLINE_TAG)) {
                DocTree tree = (endTree != null) ? endTree : tsi.tree;
                Name treeName = ((StartElementTree) tsi.tree).getName();
                env.messages.warning(HTML, tree, "dc.tag.empty", treeName);
            }
        }
    }
View Full Code Here

    @Override @SuppressWarnings("fallthrough")
    public Void visitAttribute(AttributeTree tree, Void ignore) {
        HtmlTag currTag = tagStack.peek().tag;
        if (currTag != null) {
            Name name = tree.getName();
            HtmlTag.Attr attr = currTag.getAttr(name);
            if (attr != null) {
                boolean first = tagStack.peek().attrs.add(attr);
                if (!first)
                    env.messages.error(HTML, tree, "dc.attr.repeated", name);
View Full Code Here

  public Void visitExecutable(ExecutableElement clientMethodElement, State state) {
    if (shouldIgnore(clientMethodElement, state)) {
      return null;
    }
    // Ignore overrides of stableId() in proxies
    Name name = clientMethodElement.getSimpleName();
    if (currentTypeIsProxy && name.contentEquals("stableId")
        && clientMethodElement.getParameters().isEmpty()) {
      return null;
    }

    ExecutableType clientMethod = viewIn(checkedElement, clientMethodElement, state);
View Full Code Here

    }
  }

  private Set<TypeMirror> getAllowedTypesForBuiltInConstraint(Class<? extends Annotation> annotation) {

    Name key = elementUtils.getName( annotation.getSimpleName() );
    Set<TypeMirror> allowedTypes = builtInConstraints.get( key );

    // create a mapping for the given annotation type if required
    if ( allowedTypes == null ) {
      allowedTypes = CollectionHelper.newHashSet();
View Full Code Here


                }
                else if(element.getAnnotation(NoGatekeeper.class)==null)
                {
                    Name simpleName = element.getEnclosingElement()!=null ? element.getEnclosingElement().getSimpleName() : element.getSimpleName();
                    System.out.println(simpleName +"(#"+nameToken.value()+")" +" is missing @AccessControl annotation!");
                }
            }
        }
    }
View Full Code Here

   *
   * @return The given mirror's annotation type.
   */
  public AnnotationType getAnnotationType(AnnotationMirror annotationMirror) {

    Name key = getName( annotationMirror.getAnnotationType() );

    AnnotationType annotationType = annotationTypeCache.get( key );

    if ( annotationType != null ) {
      return annotationType;
View Full Code Here

   *
   * @return A set with the supported types.
   */
  private Set<TypeMirror> getSupportedTypes(DeclaredType constraintAnnotationType) {

    Name key = getName( constraintAnnotationType );
    Set<TypeMirror> supportedTypes = supportedTypesByConstraint.get( key );

    // create a mapping for the given annotation type if required
    if ( supportedTypes == null ) {
      supportedTypes = determineSupportedTypes( constraintAnnotationType );
View Full Code Here

    DeclaredType annotation = annotationApiHelper.getDeclaredTypeByName( annotationType );

    if ( annotation == null ) {
      return;
    }
    Name key = getName( annotation );
    Set<TypeMirror> types = supportedTypesByConstraint.get( key );

    if ( types == null ) {
      supportedTypesByConstraint.put( key, new HashSet<TypeMirror>( supportedTypes ) );
    }
View Full Code Here

    }
  }

  private Set<AnnotationMirror> getComposingConstraints(DeclaredType constraintAnnotationType) {

    Name key = getName( constraintAnnotationType );

    Set<AnnotationMirror> composingConstraints = composingConstraintsByConstraints.get( key );

    if( composingConstraints != null ) {
      return composingConstraints;
View Full Code Here

TOP

Related Classes of javax.lang.model.element.Name

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.