类 JtaTransactionAnnotationParser
- java.lang.Object
- org.springframework.transaction.annotation.JtaTransactionAnnotationParser
- 所有已实现的接口:
Serializable
,TransactionAnnotationParser
public class JtaTransactionAnnotationParser extends Object implements TransactionAnnotationParser, Serializable
Strategy implementation for parsing JTA 1.2'sTransactional
annotation.- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
- 序列化表格
构造器概要
构造器 构造器 说明 JtaTransactionAnnotationParser()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(Object other)
int
hashCode()
boolean
isCandidateClass(Class<?> targetClass)
Determine whether the given class is a candidate for transaction attributes in the annotation format of thisTransactionAnnotationParser
.TransactionAttribute
parseTransactionAnnotation(AnnotatedElement element)
Parse the transaction attribute for the given method or class, based on an annotation type understood by this parser.TransactionAttribute
parseTransactionAnnotation(Transactional ann)
protected TransactionAttribute
parseTransactionAnnotation(AnnotationAttributes attributes)
构造器详细资料
JtaTransactionAnnotationParser
public JtaTransactionAnnotationParser()
方法详细资料
isCandidateClass
public boolean isCandidateClass(Class<?> targetClass)
从接口复制的说明:TransactionAnnotationParser
Determine whether the given class is a candidate for transaction attributes in the annotation format of thisTransactionAnnotationParser
.If this method returns
false
, the methods on the given class will not get traversed for#parseTransactionAnnotation
introspection. Returningfalse
is therefore an optimization for non-affected classes, whereastrue
simply means that the class needs to get fully introspected for each method on the given class individually.- 指定者:
isCandidateClass
在接口中TransactionAnnotationParser
- 参数:
targetClass
- the class to introspect- 返回:
false
if the class is known to have no transaction annotations at class or method level;true
otherwise. The default implementation returnstrue
, leading to regular introspection.
parseTransactionAnnotation
@Nullable public TransactionAttribute parseTransactionAnnotation(AnnotatedElement element)
从接口复制的说明:TransactionAnnotationParser
Parse the transaction attribute for the given method or class, based on an annotation type understood by this parser.This essentially parses a known transaction annotation into Spring's metadata attribute class. Returns
null
if the method/class is not transactional.- 指定者:
parseTransactionAnnotation
在接口中TransactionAnnotationParser
- 参数:
element
- the annotated method or class- 返回:
- the configured transaction attribute, or
null
if none found - 另请参阅:
AnnotationTransactionAttributeSource.determineTransactionAttribute(java.lang.reflect.AnnotatedElement)
parseTransactionAnnotation
public TransactionAttribute parseTransactionAnnotation(Transactional ann)
parseTransactionAnnotation
protected TransactionAttribute parseTransactionAnnotation(AnnotationAttributes attributes)