Package javax.lang.model.util

Examples of javax.lang.model.util.Elements


  }

  public static TypeMirror getCollectionElementType(DeclaredType t, String fqNameOfReturnedType, String explicitTargetEntityName, Context context) {
    TypeMirror collectionElementType;
    if ( explicitTargetEntityName != null ) {
      Elements elements = context.getElementUtils();
      TypeElement element = elements.getTypeElement( explicitTargetEntityName );
      collectionElementType = element.asType();
    }
    else {
      List<? extends TypeMirror> typeArguments = t.getTypeArguments();
      if ( typeArguments.size() == 0 ) {
View Full Code Here


  public AccessTypeInformation getAccessTypeInfo(String fqcn) {
    return accessTypeInformation.get( fqcn );
  }

  public TypeElement getTypeElementForFullyQualifiedName(String fqcn) {
    Elements elementUtils = pe.getElementUtils();
    return elementUtils.getTypeElement( fqcn );
  }
View Full Code Here

      return resourceName.substring( resourceName.lastIndexOf( Constants.PATH_SEPARATOR ) + 1 );
    }
  }

  private boolean xmlMappedTypeExists(String fullyQualifiedClassName) {
    Elements utils = context.getElementUtils();
    return utils.getTypeElement( fullyQualifiedClassName ) != null;
  }
View Full Code Here

    Elements utils = context.getElementUtils();
    return utils.getTypeElement( fullyQualifiedClassName ) != null;
  }

  private TypeElement getXmlMappedType(String fullyQualifiedClassName) {
    Elements utils = context.getElementUtils();
    return utils.getTypeElement( fullyQualifiedClassName );
  }
View Full Code Here

      return resourceName.substring( resourceName.lastIndexOf( Constants.PATH_SEPARATOR ) + 1 );
    }
  }

  private boolean xmlMappedTypeExists(String fullyQualifiedClassName) {
    Elements utils = context.getElementUtils();
    return utils.getTypeElement( fullyQualifiedClassName ) != null;
  }
View Full Code Here

    Elements utils = context.getElementUtils();
    return utils.getTypeElement( fullyQualifiedClassName ) != null;
  }

  private TypeElement getXmlMappedType(String fullyQualifiedClassName) {
    Elements utils = context.getElementUtils();
    return utils.getTypeElement( fullyQualifiedClassName );
  }
View Full Code Here

        .append( ";" )
        .toString();
  }

  public String getPropertyName() {
    Elements elementsUtil = parent.getContext().getElementUtils();
    if ( element.getKind() == ElementKind.FIELD ) {
      return element.getSimpleName().toString();
    }
    else if ( element.getKind() == ElementKind.METHOD ) {
      String name = element.getSimpleName().toString();
      if ( name.startsWith( "get" ) ) {
        return elementsUtil.getName( Introspector.decapitalize( name.substring( "get".length() ) ) ).toString();
      }
      else if ( name.startsWith( "is" ) ) {
        return ( elementsUtil.getName( Introspector.decapitalize( name.substring( "is".length() ) ) ) ).toString();
      }
      return elementsUtil.getName( Introspector.decapitalize( name ) ).toString();
    }
    else {
      return elementsUtil.getName( element.getSimpleName() + "/* " + element.getKind() + " */" ).toString();
    }
  }
View Full Code Here

  }

  public static TypeMirror getCollectionElementType(DeclaredType t, String fqNameOfReturnedType, String explicitTargetEntityName, Context context) {
    TypeMirror collectionElementType;
    if ( explicitTargetEntityName != null ) {
      Elements elements = context.getElementUtils();
      TypeElement element = elements.getTypeElement( explicitTargetEntityName );
      collectionElementType = element.asType();
    }
    else {
      List<? extends TypeMirror> typeArguments = t.getTypeArguments();
      if ( typeArguments.size() == 0 ) {
View Full Code Here

  public AccessTypeInformation getAccessTypeInfo(String fqcn) {
    return accessTypeInformation.get( fqcn );
  }

  public TypeElement getTypeElementForFullyQualifiedName(String fqcn) {
    Elements elementUtils = pe.getElementUtils();
    return elementUtils.getTypeElement( fqcn );
  }
View Full Code Here

  public AccessTypeInformation getAccessTypeInfo(String fqcn) {
    return accessTypeInformation.get( fqcn );
  }

  public TypeElement getTypeElementForFullyQualifiedName(String fqcn) {
    Elements elementUtils = pe.getElementUtils();
    return elementUtils.getTypeElement( fqcn );
  }
View Full Code Here

TOP

Related Classes of javax.lang.model.util.Elements

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.