Codota Logo
InjectionException
Code IndexAdd Codota to your IDE (free)

How to use
InjectionException
in
org.jboss.msc.inject

Best Java code snippets using org.jboss.msc.inject.InjectionException (Showing top 17 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.jboss.msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) {
  try {
    field.set(target.getValue(), value);
  } catch (Exception e) {
    throw new InjectionException("Failed to inject value into field", e);
  }
}
origin: org.infinispan.server/infinispan-server-infinispan

@Override
public final InjectionException failedToInjectSecurityRealm(final UnknownHostException cause, final SecurityRealm realm) {
  final InjectionException result = new InjectionException(String.format(getLoggingLocale(), failedToInjectSecurityRealm$str(), realm), cause);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String invalidEntryMergePolicy = "DGISPN0125: %s is not a valid EntryMergePolicy";
origin: org.jboss.msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) throws InjectionException {
  if (map.putIfAbsent(key, value) != null) {
    throw new InjectionException("Value already injected into map key " + key);
  }
  super.inject(value);
}
origin: org.infinispan.server/infinispan-server-infinispan

@Override
public final InjectionException failedToInjectSocketBinding(final UnknownHostException cause, final OutboundSocketBinding binding) {
  final InjectionException result = new InjectionException(String.format(getLoggingLocale(), failedToInjectSocketBinding$str(), binding), cause);
  final StackTraceElement[] st = result.getStackTrace();
  result.setStackTrace(Arrays.copyOfRange(st, 1, st.length));
  return result;
}
private static final String transportRequired = "DGISPN0101: Failed to add %s %s cache to non-clustered %s cache container.";
origin: org.jboss.msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) throws InjectionException {
  if (! valueUpdater.compareAndSet(this, null, new ImmediateValue<T>(value))) {
    throw new InjectionException("Value already set for this injector");
  }
}
origin: org.jboss.msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) {
  try {
    method.invoke(target.getValue(), value);
  } catch (Exception e) {
    throw new InjectionException("Failed to inject value into method", e);
  }
}
origin: jboss-msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) {
  try {
    field.set(target.getValue(), value);
  } catch (Exception e) {
    throw new InjectionException("Failed to inject value into field", e);
  }
}
origin: org.jboss.msc/jboss-msc

/** {@inheritDoc} */
public void inject(final Object value) throws InjectionException {
  final T castValue;
  try {
    castValue = type.cast(value);
  } catch (ClassCastException e) {
    throw new InjectionException("Injecting the wrong type (expected " + type + ", got " + value.getClass() + ")", e);
  }
  target.inject(castValue);
}
origin: jboss-msc/jboss-msc

/** {@inheritDoc} */
public void inject(final Object value) throws InjectionException {
  final T castValue;
  try {
    castValue = type.cast(value);
  } catch (ClassCastException e) {
    throw new InjectionException("Injecting the wrong type (expected " + type + ", got " + value.getClass() + ")", e);
  }
  target.inject(castValue);
}
origin: jboss-msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) throws InjectionException {
  if (! valueUpdater.compareAndSet(this, null, new ImmediateValue<T>(value))) {
    throw new InjectionException("Value already set for this injector");
  }
}
origin: jboss-msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) {
  try {
    method.invoke(target.getValue(), value);
  } catch (Exception e) {
    throw new InjectionException("Failed to inject value into method", e);
  }
}
origin: jboss-msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) throws InjectionException {
  if (map.putIfAbsent(key, value) != null) {
    throw new InjectionException("Value already injected into map key " + key);
  }
  super.inject(value);
}
origin: org.jboss.msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) {
  super.inject(value);
  try {
    addMethod.invoke(target.getValue(), value);
  } catch (Exception e) {
    throw new InjectionException("Failed to inject value into method", e);
  }
}
origin: jboss-msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) {
  super.inject(value);
  try {
    addMethod.invoke(target.getValue(), value);
  } catch (Exception e) {
    throw new InjectionException("Failed to inject value into method", e);
  }
}
origin: org.jboss.as/jboss-as-demos-legacy

public void inject(final NamingStore value) throws InjectionException {
  try {
    injector.inject((Context) value.lookup(new CompositeName()));
  } catch (NamingException e) {
    throw new InjectionException(e);
  }
}
origin: org.jboss.msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) throws InjectionException {
  final ThreadLocalValue<Object> injectedValue = Values.injectedValue();
  final ThreadLocalValue<Object> tlsThisValue = Values.thisValue();
  final Value<?> thisValue = targetValue;
  final Value<?> oldInjectedValue = injectedValue.getAndSetValue((Value<?>) new ImmediateValue<T>(value));
  try {
    final Value<?> oldThis = tlsThisValue.getAndSetValue(thisValue);
    try {
      method.invoke(thisValue.getValue(), Values.getValues(parameterList));
    } catch (InvocationTargetException e) {
      try {
        throw e.getCause();
      } catch (InjectionException e2) {
        throw e2;
      } catch (Throwable throwable) {
        throw new InjectionException("Injection failed", e);
      }
    } catch (Exception e) {
      throw new InjectionException("Injection failed", e);
    } finally {
      tlsThisValue.setValue(oldThis);
    }
  } finally {
    injectedValue.setValue(oldInjectedValue);
  }
}
origin: jboss-msc/jboss-msc

/** {@inheritDoc} */
public void inject(final T value) throws InjectionException {
  final ThreadLocalValue<Object> injectedValue = Values.injectedValue();
  final ThreadLocalValue<Object> tlsThisValue = Values.thisValue();
  final Value<?> thisValue = targetValue;
  final Value<?> oldInjectedValue = injectedValue.getAndSetValue((Value<?>) new ImmediateValue<T>(value));
  try {
    final Value<?> oldThis = tlsThisValue.getAndSetValue(thisValue);
    try {
      method.invoke(thisValue.getValue(), Values.getValues(parameterList));
    } catch (InvocationTargetException e) {
      try {
        throw e.getCause();
      } catch (InjectionException e2) {
        throw e2;
      } catch (Throwable throwable) {
        throw new InjectionException("Injection failed", e);
      }
    } catch (Exception e) {
      throw new InjectionException("Injection failed", e);
    } finally {
      tlsThisValue.setValue(oldThis);
    }
  } finally {
    injectedValue.setValue(oldInjectedValue);
  }
}
org.jboss.msc.injectInjectionException

Javadoc

An injection exception which is thrown when an injection fails for some reason.

Most used methods

  • <init>
    Constructs a InjectionException with the specified cause. The detail message is set to:(cause == nul
  • getStackTrace
  • setStackTrace

Popular in Java

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • startActivity (Activity)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InetAddress (java.net)
    This class represents an Internet Protocol (IP) address. An IP address is either a 32-bit or 128-bit
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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