Package br.gov.frameworkdemoiselle.annotation

Examples of br.gov.frameworkdemoiselle.annotation.Name


    JMXConfig configuration = Beans.getReference(JMXConfig.class);

    for (ManagedType type : managedTypes) {
      DynamicMBeanProxy beanProxy = new DynamicMBeanProxy(type);
     
      Name nameAnnotation = type.getType().getAnnotation(Name.class);
      String mbeanName = nameAnnotation != null ? nameAnnotation.value() : type.getType().getSimpleName();

      StringBuffer name = new StringBuffer()
        .append( configuration.getMbeanDomain()!=null ? configuration.getMbeanDomain() : type.getType().getPackage().getName() )
        .append(":name=")
        .append( mbeanName );
View Full Code Here


  }

  private String getKeyByAnnotation(Field field) {
    String key = null;

    Name nameAnnotation = field.getAnnotation(Name.class);
    if (Strings.isEmpty(nameAnnotation.value())) {
      throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"));
    } else {
      key = nameAnnotation.value();
    }

    return key;
  }
View Full Code Here

  }

  private String getKeyByAnnotation(Field field) {
    String key = null;

    Name nameAnnotation = field.getAnnotation(Name.class);
    if (Strings.isEmpty(nameAnnotation.value())) {
      throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"));
    } else {
      key = nameAnnotation.value();
    }

    return key;
  }
View Full Code Here

  }

  private String getKeyByAnnotation(Field field) {
    String key = null;

    Name nameAnnotation = field.getAnnotation(Name.class);
    if (Strings.isEmpty(nameAnnotation.value())) {
      throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"));
    } else {
      key = nameAnnotation.value();
    }

    return key;
  }
View Full Code Here

    }

    private String getNameByAnnotation(Field field) {
      String key = null;

      Name nameAnnotation = field.getAnnotation(Name.class);
      if (Strings.isEmpty(nameAnnotation.value())) {
        throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"));
      } else {
        key = nameAnnotation.value();
      }

      return key;
    }
View Full Code Here

      validateField(field);
    }
  }

  private void validateField(Field field) {
    Name annotation = field.getAnnotation(Name.class);

    if (annotation != null && Strings.isEmpty(annotation.value())) {
      throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"),
          new IllegalArgumentException());
    }
  }
View Full Code Here

  }

  private String getKeyByAnnotation(Field field) {
    String key = null;

    Name nameAnnotation = field.getAnnotation(Name.class);
    if (Strings.isEmpty(nameAnnotation.value())) {
      throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"));
    } else {
      key = nameAnnotation.value();
    }

    return key;
  }
View Full Code Here

      validateField(field);
    }
  }

  private void validateField(Field field) {
    Name annotation = field.getAnnotation(Name.class);

    if (annotation != null && Strings.isEmpty(annotation.value())) {
      throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"),
          new IllegalArgumentException());
    }
  }
View Full Code Here

      validateField(field);
    }
  }

  private void validateField(Field field) {
    Name annotation = field.getAnnotation(Name.class);

    if (annotation != null && Strings.isEmpty(annotation.value())) {
      throw new ConfigurationException(getBundle().getString("configuration-name-attribute-cant-be-empty"),
          new IllegalArgumentException());
    }
  }
View Full Code Here

    JMXConfig configuration = Beans.getReference(JMXConfig.class);

    for (ManagedType type : managedTypes) {
      DynamicMBeanProxy beanProxy = new DynamicMBeanProxy(type);
     
      Name nameAnnotation = type.getType().getAnnotation(Name.class);
      String mbeanName = nameAnnotation != null ? nameAnnotation.value() : type.getType().getSimpleName();

      StringBuffer name = new StringBuffer()
        .append( configuration.getMbeanDomain()!=null ? configuration.getMbeanDomain() : type.getType().getPackage().getName() )
        .append(":name=")
        .append( mbeanName );
View Full Code Here

TOP

Related Classes of br.gov.frameworkdemoiselle.annotation.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.