Reviewed By: jvillard Differential Revision: D22034683 fbshipit-source-id: b354d14b3master
parent
788a600ed9
commit
ec7930be20
@ -0,0 +1,12 @@
|
|||||||
|
A method annotated with `@NoAllocation` transitively calls `new`.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```java
|
||||||
|
class C implements I {
|
||||||
|
@NoAllocation
|
||||||
|
void directlyAllocatingMethod() {
|
||||||
|
new Object();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
@ -0,0 +1 @@
|
|||||||
|
A method annotated with an annotation `@A` transitively calls a method annotated `@B` where the combination of annotations is forbidden (for example, `@UiThread` calling `@WorkerThread`).
|
@ -0,0 +1,15 @@
|
|||||||
|
A method annotated with `@PerformanceCritical` transitively calls a method annotated `@Expensive`.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```java
|
||||||
|
class C {
|
||||||
|
@PerformanceCritical
|
||||||
|
void perfCritical() {
|
||||||
|
expensive();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Expensive
|
||||||
|
void expensive() {}
|
||||||
|
}
|
||||||
|
```
|
@ -0,0 +1,14 @@
|
|||||||
|
A method annotated with `@Expensive` overrides an un-annotated method.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
```java
|
||||||
|
interface I {
|
||||||
|
void foo();
|
||||||
|
}
|
||||||
|
|
||||||
|
class A implements I {
|
||||||
|
@Expensive
|
||||||
|
public void foo() {}
|
||||||
|
}
|
||||||
|
```
|
Loading…
Reference in new issue