Package org.aspectj.lang.annotation

Examples of org.aspectj.lang.annotation.DeclareParents


   * <p>Resulting Advisors will need to be evaluated for targets.
   * @param introductionField the field to introspect
   * @return <code>null</code> if not an Advisor
   */
  private Advisor getDeclareParentsAdvisor(Field introductionField) {
    DeclareParents declareParents = (DeclareParents) introductionField.getAnnotation(DeclareParents.class);
    if (declareParents == null) {
      // Not an introduction field
      return null;
    }

    if (DeclareParents.class.equals(declareParents.defaultImpl())) {
      // This is what comes back if it wasn't set. This seems bizarre...
      // TODO this restriction possibly should be relaxed
      throw new IllegalStateException("defaultImpl must be set on DeclareParents");
    }

    return new DeclareParentsAdvisor(
        introductionField.getType(), declareParents.value(), declareParents.defaultImpl());
  }
View Full Code Here


   * <p>Resulting Advisors will need to be evaluated for targets.
   * @param introductionField the field to introspect
   * @return <code>null</code> if not an Advisor
   */
  private Advisor getDeclareParentsAdvisor(Field introductionField) {
    DeclareParents declareParents = introductionField.getAnnotation(DeclareParents.class);
    if (declareParents == null) {
      // Not an introduction field
      return null;
    }

    if (DeclareParents.class.equals(declareParents.defaultImpl())) {
      // This is what comes back if it wasn't set. This seems bizarre...
      // TODO this restriction possibly should be relaxed
      throw new IllegalStateException("defaultImpl must be set on DeclareParents");
    }

    return new DeclareParentsAdvisor(
        introductionField.getType(), declareParents.value(), declareParents.defaultImpl());
  }
View Full Code Here

   * <p>Resulting Advisors will need to be evaluated for targets.
   * @param introductionField the field to introspect
   * @return <code>null</code> if not an Advisor
   */
  private Advisor getDeclareParentsAdvisor(Field introductionField) {
    DeclareParents declareParents = (DeclareParents) introductionField.getAnnotation(DeclareParents.class);
    if (declareParents == null) {
      // Not an introduction field
      return null;
    }

    if (DeclareParents.class.equals(declareParents.defaultImpl())) {
      // This is what comes back if it wasn't set. This seems bizarre...
      // TODO this restriction possibly should be relaxed
      throw new IllegalStateException("defaultImpl must be set on DeclareParents");
    }

    return new DeclareParentsAdvisor(
        introductionField.getType(), declareParents.value(), declareParents.defaultImpl());
  }
View Full Code Here

   * <p>Resulting Advisors will need to be evaluated for targets.
   * @param introductionField the field to introspect
   * @return {@code null} if not an Advisor
   */
  private Advisor getDeclareParentsAdvisor(Field introductionField) {
    DeclareParents declareParents = introductionField.getAnnotation(DeclareParents.class);
    if (declareParents == null) {
      // Not an introduction field
      return null;
    }

    if (DeclareParents.class.equals(declareParents.defaultImpl())) {
      // This is what comes back if it wasn't set. This seems bizarre...
      // TODO this restriction possibly should be relaxed
      throw new IllegalStateException("defaultImpl must be set on DeclareParents");
    }

    return new DeclareParentsAdvisor(
        introductionField.getType(), declareParents.value(), declareParents.defaultImpl());
  }
View Full Code Here

TOP

Related Classes of org.aspectj.lang.annotation.DeclareParents

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.