Merge remote branch 'origin/master'
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
package jet.typeinfo;
|
package jet.typeinfo;
|
||||||
|
|
||||||
import jet.JetObject;
|
import jet.JetObject;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -44,7 +43,7 @@ public abstract class TypeInfo<T> implements JetObject {
|
|||||||
|
|
||||||
public static <T> TypeInfoProjection inProjection(TypeInfo<T> typeInfo) {
|
public static <T> TypeInfoProjection inProjection(TypeInfo<T> typeInfo) {
|
||||||
return new TypeInfoProjection.TypeInfoProjectionImpl(typeInfo) {
|
return new TypeInfoProjection.TypeInfoProjectionImpl(typeInfo) {
|
||||||
@NotNull
|
// @NotNull
|
||||||
@Override
|
@Override
|
||||||
public TypeInfoVariance getVariance() {
|
public TypeInfoVariance getVariance() {
|
||||||
return TypeInfoVariance.IN_VARIANCE;
|
return TypeInfoVariance.IN_VARIANCE;
|
||||||
@@ -54,7 +53,7 @@ public abstract class TypeInfo<T> implements JetObject {
|
|||||||
|
|
||||||
public static <T> TypeInfoProjection outProjection(TypeInfo<T> typeInfo) {
|
public static <T> TypeInfoProjection outProjection(TypeInfo<T> typeInfo) {
|
||||||
return new TypeInfoProjection.TypeInfoProjectionImpl(typeInfo) {
|
return new TypeInfoProjection.TypeInfoProjectionImpl(typeInfo) {
|
||||||
@NotNull
|
// @NotNull
|
||||||
@Override
|
@Override
|
||||||
public TypeInfoVariance getVariance() {
|
public TypeInfoVariance getVariance() {
|
||||||
return TypeInfoVariance.OUT_VARIANCE;
|
return TypeInfoVariance.OUT_VARIANCE;
|
||||||
@@ -171,13 +170,13 @@ public abstract class TypeInfo<T> implements JetObject {
|
|||||||
super(klazz, nullable, projections);
|
super(klazz, nullable, projections);
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
// @NotNull
|
||||||
@Override
|
@Override
|
||||||
public TypeInfoVariance getVariance() {
|
public TypeInfoVariance getVariance() {
|
||||||
return TypeInfoVariance.INVARIANT;
|
return TypeInfoVariance.INVARIANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
@NotNull
|
// @NotNull
|
||||||
@Override
|
@Override
|
||||||
public TypeInfo getType() {
|
public TypeInfo getType() {
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -1,26 +1,21 @@
|
|||||||
package jet.typeinfo;
|
package jet.typeinfo;
|
||||||
|
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author alex.tkachman
|
* @author alex.tkachman
|
||||||
*/
|
*/
|
||||||
public interface TypeInfoProjection {
|
public interface TypeInfoProjection {
|
||||||
@NotNull
|
|
||||||
TypeInfoVariance getVariance();
|
TypeInfoVariance getVariance();
|
||||||
|
|
||||||
@NotNull
|
|
||||||
TypeInfo getType();
|
TypeInfo getType();
|
||||||
|
|
||||||
abstract class TypeInfoProjectionImpl implements TypeInfoProjection {
|
abstract class TypeInfoProjectionImpl implements TypeInfoProjection {
|
||||||
@NotNull private final TypeInfo type;
|
private final TypeInfo type;
|
||||||
|
|
||||||
TypeInfoProjectionImpl(@NotNull TypeInfo typeInfo) {
|
TypeInfoProjectionImpl(TypeInfo typeInfo) {
|
||||||
this.type = typeInfo;
|
this.type = typeInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@NotNull
|
|
||||||
public final TypeInfo getType() {
|
public final TypeInfo getType() {
|
||||||
return type;
|
return type;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
</content>
|
</content>
|
||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="library" name="annotations" level="project" />
|
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user