Package org.adoptopenjdk.jitwatch.model
Class AbstractMetaMember
- java.lang.Object
-
- org.adoptopenjdk.jitwatch.model.AbstractMetaMember
-
- All Implemented Interfaces:
java.lang.Comparable<IMetaMember>,IMetaMember
- Direct Known Subclasses:
MetaConstructor,MetaMethod
public abstract class AbstractMetaMember extends java.lang.Object implements IMetaMember, java.lang.Comparable<IMetaMember>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Compilation>compilationsprivate booleanisCompiledprotected booleanisPolymorphicSignatureprotected booleanisVarArgsprotected static com.chrisnewland.freelogj.Loggerloggerprivate java.lang.StringmemberNameprotected MetaClassmetaClassprotected intmodifierprotected java.util.List<java.lang.Class<?>>paramTypesprotected java.lang.Class<?>returnTypeprivate intselectedCompilationIndex
-
Constructor Summary
Constructors Constructor Description AbstractMetaMember(java.lang.String memberName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAssembly(AssemblyMethod asmMethod)protected voidcheckPolymorphicSignature(java.lang.reflect.Method method)intcompareTo(IMetaMember other)static java.lang.StringexpandParam(java.lang.String inParamType, boolean fullyQualifiedType)static java.lang.StringexpandParamRegEx(java.lang.String inParamType)java.lang.StringgetAbbreviatedFullyQualifiedMemberName()private java.util.List<java.lang.Class<?>>getClassesForParamTypes(MemberSignatureParts msp)CompilationgetCompilation(int index)CompilationgetCompilationByAddress(AssemblyMethod asmMethod)CompilationgetCompilationByCompileID(java.lang.String compileID)java.util.List<Compilation>getCompilations()java.lang.StringgetCompiledAttribute(java.lang.String key)java.util.Map<java.lang.String,java.lang.String>getCompiledAttributes()java.lang.StringgetFullyQualifiedMemberName()java.util.List<BytecodeInstruction>getInstructions()CompilationgetLastCompilation()MemberBytecodegetMemberBytecode()java.lang.StringgetMemberName()MetaClassgetMetaClass()intgetModifier()java.lang.StringgetModifierString()java.lang.String[]getParamTypeNames()java.lang.StringgetQueuedAttribute(java.lang.String key)java.util.Map<java.lang.String,java.lang.String>getQueuedAttributes()java.lang.StringgetReturnTypeName()CompilationgetSelectedCompilation()java.lang.StringgetSourceMethodSignatureRegEx()booleanisCompiled()booleanisConstructor()private intmakeSafeIndex(int index)booleanmatchesSignature(MemberSignatureParts msp, boolean matchTypesExactly)private booleannameMatches(MemberSignatureParts msp)private booleanreturnTypeMatches(MemberSignatureParts msp)voidsetCompiled(boolean compiled)voidsetSelectedCompilation(int index)voidstoreCompilation(Compilation compilation)java.lang.StringtoStringUnqualifiedMethodName(boolean visibilityAndReturnType, boolean fqParamTypes)
-
-
-
Field Detail
-
logger
protected static final com.chrisnewland.freelogj.Logger logger
-
metaClass
protected MetaClass metaClass
-
compilations
private java.util.List<Compilation> compilations
-
selectedCompilationIndex
private int selectedCompilationIndex
-
isCompiled
private boolean isCompiled
-
isVarArgs
protected boolean isVarArgs
-
isPolymorphicSignature
protected boolean isPolymorphicSignature
-
modifier
protected int modifier
-
memberName
private java.lang.String memberName
-
returnType
protected java.lang.Class<?> returnType
-
paramTypes
protected java.util.List<java.lang.Class<?>> paramTypes
-
-
Method Detail
-
checkPolymorphicSignature
protected void checkPolymorphicSignature(java.lang.reflect.Method method)
-
getMemberName
public java.lang.String getMemberName()
- Specified by:
getMemberNamein interfaceIMetaMember
-
getFullyQualifiedMemberName
public java.lang.String getFullyQualifiedMemberName()
- Specified by:
getFullyQualifiedMemberNamein interfaceIMetaMember
-
getAbbreviatedFullyQualifiedMemberName
public java.lang.String getAbbreviatedFullyQualifiedMemberName()
- Specified by:
getAbbreviatedFullyQualifiedMemberNamein interfaceIMetaMember
-
getModifier
public int getModifier()
- Specified by:
getModifierin interfaceIMetaMember
-
getModifierString
public java.lang.String getModifierString()
- Specified by:
getModifierStringin interfaceIMetaMember
-
nameMatches
private boolean nameMatches(MemberSignatureParts msp)
-
returnTypeMatches
private boolean returnTypeMatches(MemberSignatureParts msp) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
matchesSignature
public boolean matchesSignature(MemberSignatureParts msp, boolean matchTypesExactly)
- Specified by:
matchesSignaturein interfaceIMetaMember
-
getClassesForParamTypes
private java.util.List<java.lang.Class<?>> getClassesForParamTypes(MemberSignatureParts msp) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
getReturnTypeName
public java.lang.String getReturnTypeName()
- Specified by:
getReturnTypeNamein interfaceIMetaMember
-
getParamTypeNames
public java.lang.String[] getParamTypeNames()
- Specified by:
getParamTypeNamesin interfaceIMetaMember
-
getMemberBytecode
public MemberBytecode getMemberBytecode()
- Specified by:
getMemberBytecodein interfaceIMetaMember
-
getInstructions
public java.util.List<BytecodeInstruction> getInstructions()
- Specified by:
getInstructionsin interfaceIMetaMember
-
getMetaClass
public MetaClass getMetaClass()
- Specified by:
getMetaClassin interfaceIMetaMember
-
getQueuedAttribute
public java.lang.String getQueuedAttribute(java.lang.String key)
- Specified by:
getQueuedAttributein interfaceIMetaMember
-
getCompiledAttribute
public java.lang.String getCompiledAttribute(java.lang.String key)
- Specified by:
getCompiledAttributein interfaceIMetaMember
-
getCompilationByCompileID
public Compilation getCompilationByCompileID(java.lang.String compileID)
- Specified by:
getCompilationByCompileIDin interfaceIMetaMember
-
getCompilationByAddress
public Compilation getCompilationByAddress(AssemblyMethod asmMethod)
- Specified by:
getCompilationByAddressin interfaceIMetaMember
-
storeCompilation
public void storeCompilation(Compilation compilation)
- Specified by:
storeCompilationin interfaceIMetaMember
-
isCompiled
public boolean isCompiled()
- Specified by:
isCompiledin interfaceIMetaMember
-
setCompiled
public void setCompiled(boolean compiled)
- Specified by:
setCompiledin interfaceIMetaMember
-
getQueuedAttributes
public java.util.Map<java.lang.String,java.lang.String> getQueuedAttributes()
- Specified by:
getQueuedAttributesin interfaceIMetaMember
-
getCompiledAttributes
public java.util.Map<java.lang.String,java.lang.String> getCompiledAttributes()
- Specified by:
getCompiledAttributesin interfaceIMetaMember
-
toStringUnqualifiedMethodName
public java.lang.String toStringUnqualifiedMethodName(boolean visibilityAndReturnType, boolean fqParamTypes)- Specified by:
toStringUnqualifiedMethodNamein interfaceIMetaMember
-
addAssembly
public void addAssembly(AssemblyMethod asmMethod)
- Specified by:
addAssemblyin interfaceIMetaMember
-
getCompilations
public java.util.List<Compilation> getCompilations()
- Specified by:
getCompilationsin interfaceIMetaMember
-
isConstructor
public boolean isConstructor()
- Specified by:
isConstructorin interfaceIMetaMember
-
getSourceMethodSignatureRegEx
public java.lang.String getSourceMethodSignatureRegEx()
- Specified by:
getSourceMethodSignatureRegExin interfaceIMetaMember
-
expandParam
public static java.lang.String expandParam(java.lang.String inParamType, boolean fullyQualifiedType)
-
expandParamRegEx
public static java.lang.String expandParamRegEx(java.lang.String inParamType)
-
getLastCompilation
public Compilation getLastCompilation()
- Specified by:
getLastCompilationin interfaceIMetaMember
-
makeSafeIndex
private int makeSafeIndex(int index)
-
getCompilation
public Compilation getCompilation(int index)
- Specified by:
getCompilationin interfaceIMetaMember
-
setSelectedCompilation
public void setSelectedCompilation(int index)
- Specified by:
setSelectedCompilationin interfaceIMetaMember
-
getSelectedCompilation
public Compilation getSelectedCompilation()
- Specified by:
getSelectedCompilationin interfaceIMetaMember
-
compareTo
public int compareTo(IMetaMember other)
- Specified by:
compareToin interfacejava.lang.Comparable<IMetaMember>
-
-