congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
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

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • getContentResolver (Context)
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Reference (javax.naming)
  • Get (org.apache.hadoop.hbase.client)
    Used to perform Get operations on a single row. To get everything for a row, instantiate a Get objec
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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