Class JApiBehavior
java.lang.Object
japicmp.model.JApiBehavior
- All Implemented Interfaces:
JApiCanBeSynthetic, JApiCompatibility, JApiHasAbstractModifier, JApiHasAccessModifier, JApiHasAnnotations, JApiHasBridgeModifier, JApiHasChangeStatus, JApiHasFinalModifier, JApiHasLineNumber, JApiHasModifiers, JApiHasStaticModifier, JApiHasSyntheticAttribute, JApiHasSyntheticModifier
- Direct Known Subclasses:
JApiConstructor, JApiMethod
public class JApiBehavior
extends Object
implements JApiHasModifiers, JApiHasChangeStatus, JApiHasAccessModifier, JApiHasStaticModifier, JApiHasFinalModifier, JApiHasAbstractModifier, JApiCompatibility, JApiHasAnnotations, JApiHasBridgeModifier, JApiCanBeSynthetic, JApiHasLineNumber
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JApiModifier<AbstractModifier> private final JApiModifier<AccessModifier> private final List<JApiAnnotation> private final JApiModifier<BridgeModifier> protected JApiChangeStatusprivate final List<JApiCompatibilityChange> private final List<JApiException> private final JApiModifier<FinalModifier> private final JApiClassprivate final JarArchiveComparatorprivate final Stringprivate final List<JApiParameter> private final JApiModifier<StaticModifier> private final JApiAttribute<SyntheticAttribute> private final JApiModifier<SyntheticModifier> -
Constructor Summary
ConstructorsConstructorDescriptionJApiBehavior(JApiClass jApiClass, String name, Optional<? extends javassist.CtBehavior> oldBehavior, Optional<? extends javassist.CtBehavior> newBehavior, JApiChangeStatus changeStatus, JarArchiveComparator jarArchiveComparator) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddParameter(JApiParameter jApiParameter) private voidcomputeAnnotationChanges(List<JApiAnnotation> annotations, Optional<? extends javassist.CtBehavior> oldBehavior, Optional<? extends javassist.CtBehavior> newBehavior, JarArchiveComparatorOptions options) private voidcomputeAnnotationChangesConstructor(List<JApiAnnotation> annotations, Optional<javassist.CtConstructor> oldBehavior, Optional<javassist.CtConstructor> newBehavior, JarArchiveComparatorOptions options) private voidcomputeAnnotationChangesMethod(List<JApiAnnotation> annotations, Optional<javassist.CtMethod> oldBehavior, Optional<javassist.CtMethod> newBehavior, JarArchiveComparatorOptions options) private List<JApiException> computeExceptionChanges(Optional<? extends javassist.CtBehavior> oldMethodOptional, Optional<? extends javassist.CtBehavior> newMethodOptional) private JApiChangeStatusevaluateChangeStatus(JApiChangeStatus changeStatus) private JApiModifier<AbstractModifier> extractAbstractModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) private JApiModifier<AccessModifier> extractAccessModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) private JApiModifier<BridgeModifier> extractBridgeModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) extractExceptions(Optional<? extends javassist.CtBehavior> methodOptional) private JApiModifier<FinalModifier> extractFinalModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) private JApiModifier<StaticModifier> extractStaticModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) protected JApiAttribute<SyntheticAttribute> extractSyntheticAttribute(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) private JApiModifier<SyntheticModifier> extractSyntheticModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) Returns the line number in the source file of the new element.Returns the abstract modifier.Returns the access modifier.Returns a list of annotations asJApiAnnotation.List<JApiAttribute<? extends Enum<?>>> Returns the bridge modifier.Returns the change status of this element.Returns all compatibility changes.Returns the final modifier.getLineNumber(Optional<? extends javassist.CtBehavior> methodOptional) List<? extends JApiModifier<? extends Enum<? extends Enum<?>>>> Returns a list of modifiers.getName()Returns the line number in the source file of the old element.Returns the static modifier.Returns the synthetic modifier.booleanhasSameParameter(JApiMethod method) booleanReturns true if this element has changed binary compatible.booleanReturns true if this element has changed source compatible.
-
Field Details
-
jApiClass
-
name
-
jarArchiveComparator
-
parameters
-
annotations
-
accessModifier
-
finalModifier
-
staticModifier
-
abstractModifier
-
bridgeModifier
-
syntheticModifier
-
syntheticAttribute
-
exceptions
-
changeStatus
-
oldLineNumber
-
newLineNumber
-
compatibilityChanges
-
-
Constructor Details
-
JApiBehavior
public JApiBehavior(JApiClass jApiClass, String name, Optional<? extends javassist.CtBehavior> oldBehavior, Optional<? extends javassist.CtBehavior> newBehavior, JApiChangeStatus changeStatus, JarArchiveComparator jarArchiveComparator)
-
-
Method Details
-
computeExceptionChanges
private List<JApiException> computeExceptionChanges(Optional<? extends javassist.CtBehavior> oldMethodOptional, Optional<? extends javassist.CtBehavior> newMethodOptional) -
extractExceptions
-
getLineNumber
-
computeAnnotationChanges
private void computeAnnotationChanges(List<JApiAnnotation> annotations, Optional<? extends javassist.CtBehavior> oldBehavior, Optional<? extends javassist.CtBehavior> newBehavior, JarArchiveComparatorOptions options) -
computeAnnotationChangesMethod
private void computeAnnotationChangesMethod(List<JApiAnnotation> annotations, Optional<javassist.CtMethod> oldBehavior, Optional<javassist.CtMethod> newBehavior, JarArchiveComparatorOptions options) -
computeAnnotationChangesConstructor
private void computeAnnotationChangesConstructor(List<JApiAnnotation> annotations, Optional<javassist.CtConstructor> oldBehavior, Optional<javassist.CtConstructor> newBehavior, JarArchiveComparatorOptions options) -
evaluateChangeStatus
-
extractSyntheticAttribute
protected JApiAttribute<SyntheticAttribute> extractSyntheticAttribute(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) -
hasSameParameter
-
extractStaticModifier
private JApiModifier<StaticModifier> extractStaticModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) -
extractFinalModifier
private JApiModifier<FinalModifier> extractFinalModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) -
extractAccessModifier
private JApiModifier<AccessModifier> extractAccessModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) -
extractAbstractModifier
private JApiModifier<AbstractModifier> extractAbstractModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) -
extractBridgeModifier
private JApiModifier<BridgeModifier> extractBridgeModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) -
extractSyntheticModifier
private JApiModifier<SyntheticModifier> extractSyntheticModifier(Optional<? extends javassist.CtBehavior> oldBehaviorOptional, Optional<? extends javassist.CtBehavior> newBehaviorOptional) -
getModifiers
Description copied from interface:JApiHasModifiersReturns a list of modifiers.- Specified by:
getModifiersin interfaceJApiHasModifiers- Returns:
- a list of modifiers
-
getName
-
getChangeStatus
Description copied from interface:JApiHasChangeStatusReturns the change status of this element.- Specified by:
getChangeStatusin interfaceJApiHasChangeStatus- Returns:
- the change status of this element
-
getParameters
-
addParameter
-
getAccessModifier
Description copied from interface:JApiHasAccessModifierReturns the access modifier.- Specified by:
getAccessModifierin interfaceJApiHasAccessModifier- Returns:
- the access modifier
-
getFinalModifier
Description copied from interface:JApiHasFinalModifierReturns the final modifier.- Specified by:
getFinalModifierin interfaceJApiHasFinalModifier- Returns:
- the final modifier
-
getStaticModifier
Description copied from interface:JApiHasStaticModifierReturns the static modifier.- Specified by:
getStaticModifierin interfaceJApiHasStaticModifier- Returns:
- the static modifier
-
getAbstractModifier
Description copied from interface:JApiHasAbstractModifierReturns the abstract modifier.- Specified by:
getAbstractModifierin interfaceJApiHasAbstractModifier- Returns:
- the abstract modifier
-
getAttributes
-
getBridgeModifier
Description copied from interface:JApiHasBridgeModifierReturns the bridge modifier. The ACC_BRIDGE property is added by the compiler for bridge methods.- Specified by:
getBridgeModifierin interfaceJApiHasBridgeModifier- Returns:
- the bridge modifier
-
getSyntheticModifier
Description copied from interface:JApiHasSyntheticModifierReturns the synthetic modifier.- Specified by:
getSyntheticModifierin interfaceJApiHasSyntheticModifier- Returns:
- the synthetic modifier
-
getSyntheticAttribute
- Specified by:
getSyntheticAttributein interfaceJApiHasSyntheticAttribute
-
isBinaryCompatible
public boolean isBinaryCompatible()Description copied from interface:JApiCompatibilityReturns true if this element has changed binary compatible.- Specified by:
isBinaryCompatiblein interfaceJApiCompatibility- Returns:
- true if this element has changed binary compatible
-
isSourceCompatible
public boolean isSourceCompatible()Description copied from interface:JApiCompatibilityReturns true if this element has changed source compatible.- Specified by:
isSourceCompatiblein interfaceJApiCompatibility- Returns:
- true if this element has changed source compatible
-
getCompatibilityChanges
Description copied from interface:JApiCompatibilityReturns all compatibility changes.- Specified by:
getCompatibilityChangesin interfaceJApiCompatibility- Returns:
- a list of compatibility changes
-
getAnnotations
Description copied from interface:JApiHasAnnotationsReturns a list of annotations asJApiAnnotation.- Specified by:
getAnnotationsin interfaceJApiHasAnnotations- Returns:
- a list of annotations as
JApiAnnotation
-
getOldLineNumber
Description copied from interface:JApiHasLineNumberReturns the line number in the source file of the old element.- Specified by:
getOldLineNumberin interfaceJApiHasLineNumber- Returns:
- the line number in the source file of the old element
-
geNewLineNumber
Description copied from interface:JApiHasLineNumberReturns the line number in the source file of the new element.- Specified by:
geNewLineNumberin interfaceJApiHasLineNumber- Returns:
- the line number in the source file of the new element
-
getOldLineNumberAsString
-
getNewLineNumberAsString
-
getExceptions
-
getjApiClass
-