fields = fields.filter(ElementMatchers.fieldType(ElementMatchers.hasSuperType(
ElementMatchers.anyOf(Map.class, Collection.class, RObject.class))));
for (InDefinedShape field : fields) {
fields = fields.filter(ElementMatchers.fieldType(ElementMatchers.hasSuperType(
ElementMatchers.anyOf(Map.class, Collection.class, RObject.class))));
for (InDefinedShape field : fields) {
fields = fields.filter(ElementMatchers.fieldType(ElementMatchers.hasSuperType(
ElementMatchers.anyOf(Map.class, Collection.class, RObject.class))));
for (InDefinedShape field : fields) {
/**
* Add {@link ElementMatcher} for the hooks.
private static AgentBuilder applyHooks(AgentBuilder agentBuilder, SortedSet<HookMetadata> hookMetadata, ClassLoaderCache classLoaderCache) {
Map<String, SortedSet<MethodSignature>> instruments = getInstruments(hookMetadata);
for (Map.Entry<String, SortedSet<MethodSignature>> entry : instruments.entrySet()) {
String instrumentedClassName = entry.getKey();
Set<MethodSignature> instrumentedMethods = entry.getValue();
agentBuilder = agentBuilder
.type(ElementMatchers.hasSuperType(named(instrumentedClassName)))
.transform(new AgentBuilder.Transformer.ForAdvice()
.include(classLoaderCache.currentClassLoader()) // must be able to load PromagentAdvice
.advice(matchAnyMethodIn(instrumentedMethods), PromagentAdvice.class.getName())
return agentBuilder;
for(int i = 0; i < arr.length; i++){
if(includeMatcher == null){
includeMatcher = ElementMatchers.hasSuperType(ElementMatchers.<TypeDescription>named(arr[i]));
continue;
includeMatcher = includeMatcher.or(ElementMatchers.hasSuperType(ElementMatchers.<TypeDescription>named(arr[i])));
String[] arr = hasSuperTypeVal.split(",");
for(int i = 0; i < arr.length; i++) {
matcher = matcher.and(ElementMatchers.not(ElementMatchers.hasSuperType(ElementMatchers.<TypeDescription>named(arr[i]))));