Package org.testng.internal
Class ClassImpl
java.lang.Object
org.testng.internal.ClassImpl
- All Implemented Interfaces:
IClass
Implementation of an IClass.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IAnnotationFinderprivate final Class<?> private Objectprivate final Objectprivate long[]private final ITestObjectFactoryprivate final ITestContextprivate Stringprivate final XmlClass -
Constructor Summary
ConstructorsConstructorDescriptionClassImpl(ITestContext context, Class<?> cls, XmlClass xmlClass, Object instance, Map<Class<?>, IClass> classes, IAnnotationFinder annotationFinder, ITestObjectFactory objectFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstance(Object instance) private static intcomputeHashCode(Object instance) private ObjectgetDefaultInstance(boolean create, String errMsgPrefix) long[]Object[]getInstances(boolean create) Returns all the instances the methods will be invoked upon.Object[]getInstances(boolean create, String errorMsgPrefix) getName()Class<?> private DetailedAttributesnewDetailedAttributes(boolean create, String errMsgPrefix) toString()
-
Field Details
-
m_class
-
m_defaultInstance
-
m_annotationFinder
-
m_instances
-
m_classes
-
m_instanceHashCodes
private long[] m_instanceHashCodes -
m_instance
-
m_objectFactory
-
m_testName
-
m_xmlClass
-
m_testContext
-
-
Constructor Details
-
ClassImpl
public ClassImpl(ITestContext context, Class<?> cls, XmlClass xmlClass, Object instance, Map<Class<?>, IClass> classes, IAnnotationFinder annotationFinder, ITestObjectFactory objectFactory)
-
-
Method Details
-
getTestName
- Specified by:
getTestNamein interfaceIClass- Returns:
- its test name if this class implements org.testng.ITest, null otherwise.
-
getName
-
getRealClass
- Specified by:
getRealClassin interfaceIClass- Returns:
- the Java class corresponding to this IClass.
-
getInstanceHashCodes
public long[] getInstanceHashCodes()- Specified by:
getInstanceHashCodesin interfaceIClass
-
getXmlTest
- Specified by:
getXmlTestin interfaceIClass- Returns:
- the <test> tag this class was found in.
-
getXmlClass
- Specified by:
getXmlClassin interfaceIClass- Returns:
- the *lt;class> tag this class was found in.
-
getDefaultInstance
-
getInstances
Description copied from interface:IClassReturns all the instances the methods will be invoked upon. This will typically be an array of one object in the absence of a @Factory annotation.- Specified by:
getInstancesin interfaceIClass- Parameters:
create- flag if a new set of instances must be returned (if set tofalse)- Returns:
- All the instances the methods will be invoked upon.
-
getInstances
- Specified by:
getInstancesin interfaceIClass
-
toString
-
addInstance
- Specified by:
addInstancein interfaceIClass
-
computeHashCode
-
newDetailedAttributes
-