Codota Logo
ProxettaFactory.setTarget
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
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 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 InputStream target) {
  return super.setTarget(target);
}
origin: oblac/jodd

@Override
public InvokeProxettaFactory setTarget(final Class 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 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 String targetName) {
  return super.setTarget(targetName);
}
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 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
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getSupportFragmentManager (FragmentActivity)
  • requestLocationUpdates (LocationManager)
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • ImageIO (javax.imageio)
  • Option (scala)
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