Java Code Examples for org.jf.dexlib2.iface.Annotation#getVisibility()

The following examples show how to use org.jf.dexlib2.iface.Annotation#getVisibility() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ImmutableAnnotation.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public static ImmutableAnnotation of(Annotation annotation) {
    if (annotation instanceof  ImmutableAnnotation) {
        return (ImmutableAnnotation)annotation;
    }
    return new ImmutableAnnotation(
            annotation.getVisibility(),
            annotation.getType(),
            annotation.getElements());
}
 
Example 2
Source File: BaseAnnotation.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (o instanceof Annotation) {
        Annotation other = (Annotation)o;
        return (getVisibility() == other.getVisibility()) &&
               getType().equals(other.getType()) &&
               getElements().equals(other.getElements());
    }
    return false;
}
 
Example 3
Source File: BuilderAnnotationPool.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Nonnull public BuilderAnnotation internAnnotation(@Nonnull Annotation annotation) {
    BuilderAnnotation ret = internedItems.get(annotation);
    if (ret != null) {
        return ret;
    }

    BuilderAnnotation dexBuilderAnnotation = new BuilderAnnotation(
            annotation.getVisibility(),
            context.typePool.internType(annotation.getType()),
            context.internAnnotationElements(annotation.getElements()));
    ret = internedItems.putIfAbsent(dexBuilderAnnotation, dexBuilderAnnotation);
    return ret==null?dexBuilderAnnotation:ret;
}
 
Example 4
Source File: ImmutableAnnotation.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
public static ImmutableAnnotation of(Annotation annotation) {
    if (annotation instanceof  ImmutableAnnotation) {
        return (ImmutableAnnotation)annotation;
    }
    return new ImmutableAnnotation(
            annotation.getVisibility(),
            annotation.getType(),
            annotation.getElements());
}
 
Example 5
Source File: BaseAnnotation.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (o instanceof Annotation) {
        Annotation other = (Annotation)o;
        return (getVisibility() == other.getVisibility()) &&
               getType().equals(other.getType()) &&
               getElements().equals(other.getElements());
    }
    return false;
}
 
Example 6
Source File: BuilderAnnotationPool.java    From zjdroid with Apache License 2.0 5 votes vote down vote up
@Nonnull public BuilderAnnotation internAnnotation(@Nonnull Annotation annotation) {
    BuilderAnnotation ret = internedItems.get(annotation);
    if (ret != null) {
        return ret;
    }

    BuilderAnnotation dexBuilderAnnotation = new BuilderAnnotation(
            annotation.getVisibility(),
            context.typePool.internType(annotation.getType()),
            context.internAnnotationElements(annotation.getElements()));
    ret = internedItems.putIfAbsent(dexBuilderAnnotation, dexBuilderAnnotation);
    return ret==null?dexBuilderAnnotation:ret;
}
 
Example 7
Source File: ImmutableAnnotation.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
public static ImmutableAnnotation of(Annotation annotation) {
    if (annotation instanceof  ImmutableAnnotation) {
        return (ImmutableAnnotation)annotation;
    }
    return new ImmutableAnnotation(
            annotation.getVisibility(),
            annotation.getType(),
            annotation.getElements());
}
 
Example 8
Source File: BaseAnnotation.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (o instanceof Annotation) {
        Annotation other = (Annotation)o;
        return (getVisibility() == other.getVisibility()) &&
               getType().equals(other.getType()) &&
               getElements().equals(other.getElements());
    }
    return false;
}
 
Example 9
Source File: BuilderAnnotationPool.java    From HeyGirl with Apache License 2.0 5 votes vote down vote up
@Nonnull public BuilderAnnotation internAnnotation(@Nonnull Annotation annotation) {
    BuilderAnnotation ret = internedItems.get(annotation);
    if (ret != null) {
        return ret;
    }

    BuilderAnnotation dexBuilderAnnotation = new BuilderAnnotation(
            annotation.getVisibility(),
            context.typePool.internType(annotation.getType()),
            context.internAnnotationElements(annotation.getElements()));
    ret = internedItems.putIfAbsent(dexBuilderAnnotation, dexBuilderAnnotation);
    return ret==null?dexBuilderAnnotation:ret;
}
 
Example 10
Source File: ImmutableAnnotation.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
public static ImmutableAnnotation of(Annotation annotation) {
    if (annotation instanceof  ImmutableAnnotation) {
        return (ImmutableAnnotation)annotation;
    }
    return new ImmutableAnnotation(
            annotation.getVisibility(),
            annotation.getType(),
            annotation.getElements());
}
 
Example 11
Source File: BaseAnnotation.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Override
public boolean equals(Object o) {
    if (o instanceof Annotation) {
        Annotation other = (Annotation)o;
        return (getVisibility() == other.getVisibility()) &&
               getType().equals(other.getType()) &&
               getElements().equals(other.getElements());
    }
    return false;
}
 
Example 12
Source File: BuilderAnnotationPool.java    From ZjDroid with Apache License 2.0 5 votes vote down vote up
@Nonnull public BuilderAnnotation internAnnotation(@Nonnull Annotation annotation) {
    BuilderAnnotation ret = internedItems.get(annotation);
    if (ret != null) {
        return ret;
    }

    BuilderAnnotation dexBuilderAnnotation = new BuilderAnnotation(
            annotation.getVisibility(),
            context.typePool.internType(annotation.getType()),
            context.internAnnotationElements(annotation.getElements()));
    ret = internedItems.putIfAbsent(dexBuilderAnnotation, dexBuilderAnnotation);
    return ret==null?dexBuilderAnnotation:ret;
}
 
Example 13
Source File: AnnotationPool.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
@Override public int getVisibility(@Nonnull Annotation annotation) {
    return annotation.getVisibility();
}
 
Example 14
Source File: AnnotationPool.java    From zjdroid with Apache License 2.0 4 votes vote down vote up
@Override public int getVisibility(@Nonnull Annotation annotation) {
    return annotation.getVisibility();
}
 
Example 15
Source File: AnnotationPool.java    From HeyGirl with Apache License 2.0 4 votes vote down vote up
@Override public int getVisibility(@Nonnull Annotation annotation) {
    return annotation.getVisibility();
}
 
Example 16
Source File: AnnotationPool.java    From ZjDroid with Apache License 2.0 4 votes vote down vote up
@Override public int getVisibility(@Nonnull Annotation annotation) {
    return annotation.getVisibility();
}