Codota Logo
ReflectiveAspectJAdvisorFactory.getDeclareParentsAdvisor
Code IndexAdd Codota to your IDE (free)

How to use
getDeclareParentsAdvisor
method
in
org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory

Best Java code snippets using org.springframework.aop.aspectj.annotation.ReflectiveAspectJAdvisorFactory.getDeclareParentsAdvisor (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: spring-projects/spring-framework

@Override
public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory) {
  Class<?> aspectClass = aspectInstanceFactory.getAspectMetadata().getAspectClass();
  String aspectName = aspectInstanceFactory.getAspectMetadata().getAspectName();
  validate(aspectClass);
  // We need to wrap the MetadataAwareAspectInstanceFactory with a decorator
  // so that it will only instantiate once.
  MetadataAwareAspectInstanceFactory lazySingletonAspectInstanceFactory =
      new LazySingletonAspectInstanceFactoryDecorator(aspectInstanceFactory);
  List<Advisor> advisors = new ArrayList<>();
  for (Method method : getAdvisorMethods(aspectClass)) {
    Advisor advisor = getAdvisor(method, lazySingletonAspectInstanceFactory, advisors.size(), aspectName);
    if (advisor != null) {
      advisors.add(advisor);
    }
  }
  // If it's a per target aspect, emit the dummy instantiating aspect.
  if (!advisors.isEmpty() && lazySingletonAspectInstanceFactory.getAspectMetadata().isLazilyInstantiated()) {
    Advisor instantiationAdvisor = new SyntheticInstantiationAdvisor(lazySingletonAspectInstanceFactory);
    advisors.add(0, instantiationAdvisor);
  }
  // Find introduction fields.
  for (Field field : aspectClass.getDeclaredFields()) {
    Advisor advisor = getDeclareParentsAdvisor(field);
    if (advisor != null) {
      advisors.add(advisor);
    }
  }
  return advisors;
}
origin: apache/servicemix-bundles

@Override
public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory) {
  Class<?> aspectClass = aspectInstanceFactory.getAspectMetadata().getAspectClass();
  String aspectName = aspectInstanceFactory.getAspectMetadata().getAspectName();
  validate(aspectClass);
  // We need to wrap the MetadataAwareAspectInstanceFactory with a decorator
  // so that it will only instantiate once.
  MetadataAwareAspectInstanceFactory lazySingletonAspectInstanceFactory =
      new LazySingletonAspectInstanceFactoryDecorator(aspectInstanceFactory);
  List<Advisor> advisors = new ArrayList<Advisor>();
  for (Method method : getAdvisorMethods(aspectClass)) {
    Advisor advisor = getAdvisor(method, lazySingletonAspectInstanceFactory, advisors.size(), aspectName);
    if (advisor != null) {
      advisors.add(advisor);
    }
  }
  // If it's a per target aspect, emit the dummy instantiating aspect.
  if (!advisors.isEmpty() && lazySingletonAspectInstanceFactory.getAspectMetadata().isLazilyInstantiated()) {
    Advisor instantiationAdvisor = new SyntheticInstantiationAdvisor(lazySingletonAspectInstanceFactory);
    advisors.add(0, instantiationAdvisor);
  }
  // Find introduction fields.
  for (Field field : aspectClass.getDeclaredFields()) {
    Advisor advisor = getDeclareParentsAdvisor(field);
    if (advisor != null) {
      advisors.add(advisor);
    }
  }
  return advisors;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.spring-aop

@Override
public List<Advisor> getAdvisors(MetadataAwareAspectInstanceFactory aspectInstanceFactory) {
  Class<?> aspectClass = aspectInstanceFactory.getAspectMetadata().getAspectClass();
  String aspectName = aspectInstanceFactory.getAspectMetadata().getAspectName();
  validate(aspectClass);
  // We need to wrap the MetadataAwareAspectInstanceFactory with a decorator
  // so that it will only instantiate once.
  MetadataAwareAspectInstanceFactory lazySingletonAspectInstanceFactory =
      new LazySingletonAspectInstanceFactoryDecorator(aspectInstanceFactory);
  List<Advisor> advisors = new ArrayList<>();
  for (Method method : getAdvisorMethods(aspectClass)) {
    Advisor advisor = getAdvisor(method, lazySingletonAspectInstanceFactory, advisors.size(), aspectName);
    if (advisor != null) {
      advisors.add(advisor);
    }
  }
  // If it's a per target aspect, emit the dummy instantiating aspect.
  if (!advisors.isEmpty() && lazySingletonAspectInstanceFactory.getAspectMetadata().isLazilyInstantiated()) {
    Advisor instantiationAdvisor = new SyntheticInstantiationAdvisor(lazySingletonAspectInstanceFactory);
    advisors.add(0, instantiationAdvisor);
  }
  // Find introduction fields.
  for (Field field : aspectClass.getDeclaredFields()) {
    Advisor advisor = getDeclareParentsAdvisor(field);
    if (advisor != null) {
      advisors.add(advisor);
    }
  }
  return advisors;
}
org.springframework.aop.aspectj.annotationReflectiveAspectJAdvisorFactorygetDeclareParentsAdvisor

Javadoc

Build a org.springframework.aop.aspectj.DeclareParentsAdvisorfor the given introduction field.

Resulting Advisors will need to be evaluated for targets.

Popular methods of ReflectiveAspectJAdvisorFactory

  • <init>
    Create a new ReflectiveAspectJAdvisorFactory, propagating the given BeanFactory to the created Aspec
  • getAdvisor
  • getAdvisorMethods
  • getPointcut
  • isAspect
  • validate

Popular in Java

  • Making http post requests using okhttp
  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now