Class ClassRef
- java.lang.Object
-
- io.opentelemetry.javaagent.extension.muzzle.ClassRef
-
public final class ClassRef extends Object
Represents a reference to a class used in the instrumentation advice or helper class code (or the helper class itself).This class is used in the auto-generated
InstrumentationModule.getMuzzleReferences()method, it is not meant to be used directly by agent extension developers.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetClassName()Returns the name of this class.Set<FieldRef>getFields()Returns the set of references to fields of this class.Set<Flag>getFlags()Returns modifier flags of this class.Set<String>getInterfaceNames()Returns the set of interfaces implemented by this class.Set<MethodRef>getMethods()Returns the set of references to methods of this class.Set<Source>getSources()Returns information about code locations where this class was referenced.@Nullable StringgetSuperClassName()Returns the name of the super class, if this class extends one; null otherwise.ClassRefmerge(ClassRef anotherReference)Create a new reference which combines this reference with another reference of the same type.static ClassRefBuildernewBuilder(String className)Start building a new reference.StringtoString()
-
-
-
Method Detail
-
newBuilder
public static ClassRefBuilder newBuilder(String className)
Start building a new reference.
-
getSources
public Set<Source> getSources()
Returns information about code locations where this class was referenced.
-
getClassName
public String getClassName()
Returns the name of this class.
-
getSuperClassName
public @Nullable String getSuperClassName()
Returns the name of the super class, if this class extends one; null otherwise.
-
getInterfaceNames
public Set<String> getInterfaceNames()
Returns the set of interfaces implemented by this class.
-
getMethods
public Set<MethodRef> getMethods()
Returns the set of references to methods of this class.
-
merge
public ClassRef merge(ClassRef anotherReference)
Create a new reference which combines this reference with another reference of the same type.- Parameters:
anotherReference- A reference to the same class.- Returns:
- a new reference which merges the two references.
-
-