congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ProxettaFactory.setTarget
Code IndexAdd Tabnine to your IDE (free)

How to use
setTarget
method
in
jodd.proxetta.ProxettaFactory

Best Java code snippets using jodd.proxetta.ProxettaFactory.setTarget (Showing top 19 results out of 315)

origin: oblac/jodd

/**
 * Defines class or interface to wrap.
 * For setting the interface of the resulting class,
 * use {@link #setTargetInterface(Class)}.
 */
@Override
public WrapperProxettaFactory setTarget(final Class target) {
  super.setTarget(target);
  this.targetClassOrInterface = target;
  return this;
}
origin: oblac/jodd

@Override
public ProxyProxettaFactory setTarget(final InputStream target) {
  return super.setTarget(target);
}
origin: oblac/jodd

@Override
public ProxyProxettaFactory setTarget(final String targetName) {
  return super.setTarget(targetName);
}
origin: oblac/jodd

@Override
public InvokeProxettaFactory setTarget(final InputStream target) {
  return super.setTarget(target);
}
origin: oblac/jodd

@Override
public ProxyProxettaFactory setTarget(final Class target) {
  return super.setTarget(target);
}
origin: oblac/jodd

@Override
public InvokeProxettaFactory setTarget(final Class target) {
  return super.setTarget(target);
}
origin: oblac/jodd

@Override
public InvokeProxettaFactory setTarget(final String targetName) {
  return super.setTarget(targetName);
}
origin: oblac/jodd

/**
 * Applies proxetta on bean class before bean registration.
 */
@SuppressWarnings("unchecked")
@Override
protected <T> BeanDefinition<T> createBeanDefinitionForRegistration(
    final String name,
    Class<T> type,
    final Scope scope,
    final WiringMode wiringMode,
    final Consumer<T> consumer)
{
  if (proxetta != null) {
    final Class originalType = type;
    final ProxettaFactory builder = proxetta.proxy();
    builder.setTarget(type);
    type = builder.define();
    return new ProxettaBeanDefinition(
      name,
      type,
      scope,
      wiringMode,
      originalType,
      proxetta.getAspects(new ProxyAspect[0]),
      consumer);
  }
  return super.createBeanDefinitionForRegistration(name, type, scope, wiringMode, consumer);
}
origin: oblac/jodd

final Proxetta proxetta = proxettaSupplier.get();
existing = proxetta.proxy().setTarget(actionClass).define();
origin: oblac/jodd

@Test
void testMethodAnnotationsProxy() {
  ProxyProxetta proxetta = Proxetta
      .proxyProxetta()
      .withAspect(
        ProxyAspect.of(HeroProxyAdvice.class,
          ((ProxyPointcut) MethodInfo::isTopLevelMethod).and(AllRealMethodsPointcut.get())
        ))
      //.setDebugFolder(FileUtil.file("~"))
      ;
  ProxettaFactory proxettaFactory = proxetta.proxy();
  proxettaFactory.setTarget(Hero.class);
  proxetta.setVariableClassName(true);
  Hero hero = (Hero) proxettaFactory.newInstance();
  assertEquals("BatmanHero37W88.3CatWoman99speeeeedXRAYnull", hero.name());
}
origin: oblac/jodd

@Test
void testClassAnnotationsProxy() {
  ProxyProxetta proxetta = Proxetta
    .proxyProxetta()
    .withAspect(
        new ProxyAspect(HeroProxyAdvice2.class,
          ((ProxyPointcut) MethodInfo::isTopLevelMethod).and(AllRealMethodsPointcut.get())
        ))
      //.setDebugFolder("/Users/igor/")
      ;
  ProxettaFactory proxettaFactory = proxetta.proxy();
  proxettaFactory.setTarget(Hero.class);
  proxetta.setVariableClassName(true);
  Hero hero = (Hero) proxettaFactory.newInstance();
  assertEquals("SilverHero89W99.222None1000speeeeedXRAYnull", hero.name());
}
origin: org.jodd/jodd-proxetta

@Override
public InvokeProxettaFactory setTarget(final String targetName) {
  return super.setTarget(targetName);
}
origin: org.jodd/jodd-proxetta

@Override
public InvokeProxettaFactory setTarget(final InputStream target) {
  return super.setTarget(target);
}
origin: org.jodd/jodd-proxetta

/**
 * Defines class or interface to wrap.
 * For setting the interface of the resulting class,
 * use {@link #setTargetInterface(Class)}.
 */
@Override
public WrapperProxettaFactory setTarget(final Class target) {
  super.setTarget(target);
  this.targetClassOrInterface = target;
  return this;
}
origin: org.jodd/jodd-proxetta

@Override
public InvokeProxettaFactory setTarget(final Class target) {
  return super.setTarget(target);
}
origin: org.jodd/jodd-proxetta

@Override
public ProxyProxettaFactory setTarget(final InputStream target) {
  return super.setTarget(target);
}
origin: org.jodd/jodd-proxetta

@Override
public ProxyProxettaFactory setTarget(final String targetName) {
  return super.setTarget(targetName);
}
origin: org.jodd/jodd-proxetta

@Override
public ProxyProxettaFactory setTarget(final Class target) {
  return super.setTarget(target);
}
origin: org.jodd/jodd-petite

/**
 * Applies proxetta on bean class before bean registration.
 */
@SuppressWarnings("unchecked")
@Override
protected <T> BeanDefinition<T> createBeanDefinitionForRegistration(
    final String name,
    Class<T> type,
    final Scope scope,
    final WiringMode wiringMode,
    final Consumer<T> consumer)
{
  if (proxetta != null) {
    final Class originalType = type;
    final ProxettaFactory builder = proxetta.proxy();
    builder.setTarget(type);
    type = builder.define();
    return new ProxettaBeanDefinition(
      name,
      type,
      scope,
      wiringMode,
      originalType,
      proxetta.getAspects(new ProxyAspect[0]),
      consumer);
  }
  return super.createBeanDefinitionForRegistration(name, type, scope, wiringMode, consumer);
}
jodd.proxettaProxettaFactorysetTarget

Javadoc

Defines class input stream as a target.

Popular methods of ProxettaFactory

  • define
    Defines class.
  • _this
  • assertProxyIsCreated
    Checks if proxy is created and throws an exception if not.
  • assertTargetIsNotDefined
    Checks if target is not defined yet.
  • dumpClassInDebugFolder
    Writes created class content to output folder for debugging purposes.
  • getProxyClassName
    Returns proxy class name.
  • isProxyApplied
    Returns true if at least one method was wrapped.
  • process
  • toByteArray
    Returns raw bytecode.
  • newInstance
    Creates new instance of created class. Assumes default no-arg constructor.

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • getExternalFilesDir (Context)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Notification (javax.management)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now