Examples of ElementKind


Examples of javax.lang.model.element.ElementKind

          //FIXME consider XML
          if ( TypeUtils.isAnnotationMirrorOfType( annotationMirror, Id.class )
              || TypeUtils.isAnnotationMirrorOfType( annotationMirror, EmbeddedId.class ) ) {
            context.logMessage( Diagnostic.Kind.OTHER, "Found id on" + searchedElement );
            final ElementKind kind = subElement.getKind();
            if ( kind == ElementKind.FIELD || kind == ElementKind.METHOD ) {
              accessType = kind == ElementKind.FIELD ? AccessType.FIELD : AccessType.PROPERTY;
              //FIXME enlever in niveau
              if ( defaultAccessTypeForHierarchy == null ) {
                this.defaultAccessTypeForHierarchy = context.getDefaultAccessTypeForHerarchy(
View Full Code Here

Examples of javax.lang.model.element.ElementKind

  }

  private void parseAttributes(Attributes attributes) {
    XmlMetaSingleAttribute attribute;
    for ( Id id : attributes.getId() ) {
      ElementKind elementKind = getElementKind( id.getAccess() );
      String type = getType( id.getName(), null, elementKind );
      if ( type != null ) {
        attribute = new XmlMetaSingleAttribute( this, id.getName(), type );
        members.add( attribute );
      }
View Full Code Here

Examples of javax.lang.model.element.ElementKind

  }

  private boolean parseElementCollection(ElementCollection collection) {
    String[] types;
    XmlMetaCollection metaCollection;
    ElementKind elementKind = getElementKind( collection.getAccess() );
    String explicitTargetClass = determineExplicitTargetEntity( collection.getTargetClass() );
    String explicitMapKey = determineExplicitMapKeyClass( collection.getMapKeyClass() );
    try {
      types = getCollectionTypes(
          collection.getName(), explicitTargetClass, explicitMapKey, elementKind
View Full Code Here

Examples of javax.lang.model.element.ElementKind

  }

  private boolean parseOneToMany(OneToMany oneToMany) {
    String[] types;
    XmlMetaCollection metaCollection;
    ElementKind elementKind = getElementKind( oneToMany.getAccess() );
    String explicitTargetClass = determineExplicitTargetEntity( oneToMany.getTargetEntity() );
    String explicitMapKey = determineExplicitMapKeyClass( oneToMany.getMapKeyClass() );
    try {
      types = getCollectionTypes( oneToMany.getName(), explicitTargetClass, explicitMapKey, elementKind );
    }
View Full Code Here

Examples of javax.lang.model.element.ElementKind

  }

  private boolean parseManyToMany(ManyToMany manyToMany) {
    String[] types;
    XmlMetaCollection metaCollection;
    ElementKind elementKind = getElementKind( manyToMany.getAccess() );
    String explicitTargetClass = determineExplicitTargetEntity( manyToMany.getTargetEntity() );
    String explicitMapKey = determineExplicitMapKeyClass( manyToMany.getMapKeyClass() );
    try {
      types = getCollectionTypes(
          manyToMany.getName(), explicitTargetClass, explicitMapKey, elementKind
View Full Code Here

Examples of javax.lang.model.element.ElementKind

    return false;
  }

  private void parseOneToOne(OneToOne oneToOne) {
    XmlMetaSingleAttribute attribute;
    ElementKind elementKind = getElementKind( oneToOne.getAccess() );
    String type = getType( oneToOne.getName(), oneToOne.getTargetEntity(), elementKind );
    if ( type != null ) {
      attribute = new XmlMetaSingleAttribute( this, oneToOne.getName(), type );
      members.add( attribute );
    }
View Full Code Here

Examples of javax.lang.model.element.ElementKind

    }
  }

  private void parseManyToOne(ManyToOne manyToOne) {
    XmlMetaSingleAttribute attribute;
    ElementKind elementKind = getElementKind( manyToOne.getAccess() );
    String type = getType( manyToOne.getName(), manyToOne.getTargetEntity(), elementKind );
    if ( type != null ) {
      attribute = new XmlMetaSingleAttribute( this, manyToOne.getName(), type );
      members.add( attribute );
    }
View Full Code Here

Examples of javax.lang.model.element.ElementKind

    }
  }

  private void parseBasic(Basic basic) {
    XmlMetaSingleAttribute attribute;
    ElementKind elementKind = getElementKind( basic.getAccess() );
    String type = getType( basic.getName(), null, elementKind );
    if ( type != null ) {
      attribute = new XmlMetaSingleAttribute( this, basic.getName(), type );
      members.add( attribute );
    }
View Full Code Here

Examples of javax.lang.model.element.ElementKind

    return defaultAccessType;
  }

  private static AccessType getAccessTypeOfIdAnnotation(Element element) {
    AccessType accessType = null;
    final ElementKind kind = element.getKind();
    if ( kind == ElementKind.FIELD || kind == ElementKind.METHOD ) {
      accessType = kind == ElementKind.FIELD ? AccessType.FIELD : AccessType.PROPERTY;
    }
    return accessType;
  }
View Full Code Here

Examples of javax.lang.model.element.ElementKind

  }

  private void parseAttributes(Attributes attributes) {
    XmlMetaSingleAttribute attribute;
    for ( Id id : attributes.getId() ) {
      ElementKind elementKind = getElementKind( id.getAccess() );
      String type = getType( id.getName(), null, elementKind );
      if ( type != null ) {
        attribute = new XmlMetaSingleAttribute( this, id.getName(), type );
        members.add( attribute );
      }
    }

    if ( attributes.getEmbeddedId() != null ) {
      EmbeddedId embeddedId = attributes.getEmbeddedId();
      ElementKind elementKind = getElementKind( embeddedId.getAccess() );
      String type = getType( embeddedId.getName(), null, elementKind );
      if ( type != null ) {
        attribute = new XmlMetaSingleAttribute( this, embeddedId.getName(), type );
        members.add( attribute );
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.