Package javax.lang.model.type

Examples of javax.lang.model.type.TypeMirror.accept()


      // TODO: implement proper property get/is/boolean detection
      if ( string.startsWith( "get" ) || string.startsWith( "is" ) ) {
        TypeMirror returnType = t.getReturnType();

        return returnType.accept( this, p );
      }
      else {
        return null;
      }
    }
View Full Code Here


    // contains the bindings of the type parameters from the implemented
    // ConstraintValidator interface, e.g. "ConstraintValidator<CheckCase, String>"
    TypeMirror constraintValidatorImplementation = getConstraintValidatorSuperType( validatorType );

    return constraintValidatorImplementation.accept(
        new TypeKindVisitor6<TypeMirror, Void>() {

          @Override
          public TypeMirror visitDeclared(DeclaredType constraintValidatorImplementation, Void p) {
            // 2nd type parameter contains the data type supported by current validator class, e.g. "String"
View Full Code Here

      for ( Element subElement : ElementFilter.fieldsIn( entity.getTypeElement().getEnclosedElements() ) ) {
        TypeMirror mirror = subElement.asType();
        if ( !TypeKind.DECLARED.equals( mirror.getKind() ) ) {
          continue;
        }
        boolean contains = mirror.accept( visitor, subElement );
        if ( contains ) {
          return true;
        }
      }
      for ( Element subElement : ElementFilter.methodsIn( entity.getTypeElement().getEnclosedElements() ) ) {
View Full Code Here

      for ( Element subElement : ElementFilter.methodsIn( entity.getTypeElement().getEnclosedElements() ) ) {
        TypeMirror mirror = subElement.asType();
        if ( !TypeKind.DECLARED.equals( mirror.getKind() ) ) {
          continue;
        }
        boolean contains = mirror.accept( visitor, subElement );
        if ( contains ) {
          return true;
        }
      }
    }
View Full Code Here

      if ( !StringUtil.isPropertyName( string ) ) {
        return Boolean.FALSE;
      }

      TypeMirror returnType = t.getReturnType();
      return returnType.accept( this, element );
    }
  }
}
View Full Code Here

      if ( !StringUtil.isPropertyName( string ) ) {
        return null;
      }

      TypeMirror returnType = t.getReturnType();
      return returnType.accept( this, p );
    }
  }
}
View Full Code Here

    if ( !StringUtil.isPropertyName( string ) ) {
      return null;
    }

    TypeMirror returnType = t.getReturnType();
    return returnType.accept( this, p );
  }

  private boolean isBasicAttribute(Element element, Element returnedElement) {
    if ( TypeUtils.containsAnnotation( element, Basic.class )
        || TypeUtils.containsAnnotation( element, OneToOne.class )
View Full Code Here

    // contains the bindings of the type parameters from the implemented
    // ConstraintValidator interface, e.g. "ConstraintValidator<CheckCase, String>"
    TypeMirror constraintValidatorImplementation = getConstraintValidatorSuperType( validatorType );

    return constraintValidatorImplementation.accept(
        new TypeKindVisitor6<TypeMirror, Void>() {

          @Override
          public TypeMirror visitDeclared(DeclaredType constraintValidatorImplementation, Void p) {
            // 2nd type parameter contains the data type supported by current validator class, e.g. "String"
View Full Code Here

    // contains the bindings of the type parameters from the implemented
    // ConstraintValidator interface, e.g. "ConstraintValidator<CheckCase, String>"
    TypeMirror constraintValidatorImplementation = getConstraintValidatorSuperType( validatorType );

    return constraintValidatorImplementation.accept(
        new TypeKindVisitor6<TypeMirror, Void>() {

          @Override
          public TypeMirror visitDeclared(DeclaredType constraintValidatorImplementation, Void p) {
            // 2nd type parameter contains the data type supported by current validator class, e.g. "String"
View Full Code Here

      @Override
      public Void visitWildcard(WildcardType t, Builder<TypeElement> p) {
        TypeMirror extendsBound = t.getExtendsBound();
        if (extendsBound != null) {
          extendsBound.accept(this, p);
        }
        TypeMirror superBound = t.getSuperBound();
        if (superBound != null) {
          superBound.accept(this, p);
        }
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.