Tabnine Logo
ProxettaFactory.define
Code IndexAdd Tabnine to your IDE (free)

How to use
define
method
in
jodd.proxetta.ProxettaFactory

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

origin: oblac/jodd

/**
 * Creates new instance of created class.
 * Assumes default no-arg constructor.
 */
public Object newInstance() {
  Class type = define();
  try {
    return ClassUtil.newInstance(type);
  } catch (Exception ex) {
    throw new ProxettaException("Invalid Proxetta class", ex);
  }
}
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: org.jodd/jodd-proxetta

/**
 * Creates new instance of created class.
 * Assumes default no-arg constructor.
 */
public Object newInstance() {
  Class type = define();
  try {
    return ClassUtil.newInstance(type);
  } catch (Exception ex) {
    throw new ProxettaException("Invalid Proxetta class", ex);
  }
}
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.proxettaProxettaFactorydefine

Javadoc

Defines class.

Popular methods of ProxettaFactory

  • setTarget
    Defines class name as a target. Class will not be loaded by classloader!
  • _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

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • scheduleAtFixedRate (Timer)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Notification (javax.management)
  • Top Vim 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