proguard.classfile.attribute.visitor.AttributeVisitor Java Examples

The following examples show how to use proguard.classfile.attribute.visitor.AttributeVisitor. 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: Attribute.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Accepts the given visitor in the context of the given code attribute.
 */
public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
{
    // Delegate the default invocation if the code attribute is null anyway.
    if (codeAttribute == null)
    {
        accept(clazz, method, attributeVisitor);
    }
    else
    {
        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
    }
}
 
Example #2
Source File: Attribute.java    From proguard with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Accepts the given visitor in the context of the given code attribute.
 */
public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
{
    // Delegate to the default invocation if the code attribute is null
    // anyway.
    if (codeAttribute == null)
    {
        accept(clazz, method, attributeVisitor);
    }
    else
    {
        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
    }
}
 
Example #3
Source File: ProgramField.java    From bazel with Apache License 2.0 5 votes vote down vote up
public void attributesAccept(ProgramClass programClass, AttributeVisitor attributeVisitor)
{
    for (int index = 0; index < u2attributesCount; index++)
    {
        attributes[index].accept(programClass, this, attributeVisitor);
    }
}
 
Example #4
Source File: Attribute.java    From proguard with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Accepts the given visitor in the context of the given method.
 */
public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
{
    // Delegate to the default invocation if the method is null anyway.
    if (method == null)
    {
        accept(clazz, (Field)null, attributeVisitor);
    }
    else
    {
        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
    }
}
 
Example #5
Source File: Attribute.java    From proguard with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Accepts the given visitor in the context of the given field.
 */
public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
{
    // Delegate to the default invocation if the field is null anyway.
    if (field == null)
    {
        accept(clazz, attributeVisitor);
    }
    else
    {
        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
    }
}
 
Example #6
Source File: Attribute.java    From bazel with Apache License 2.0 5 votes vote down vote up
/**
 * Accepts the given visitor in the context of the given field.
 */
public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
{
    // Delegate to the default invocation if the field is null anyway.
    if (field == null)
    {
        accept(clazz, attributeVisitor);
    }
    else
    {
        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
    }
}
 
Example #7
Source File: CodeAttribute.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Applies the given attribute visitor to all attributes.
 */
public void attributesAccept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
{
    for (int index = 0; index < u2attributesCount; index++)
    {
        attributes[index].accept(clazz, method, this, attributeVisitor);
    }
}
 
Example #8
Source File: ProgramField.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
public void attributesAccept(ProgramClass programClass, AttributeVisitor attributeVisitor)
{
    for (int index = 0; index < u2attributesCount; index++)
    {
        attributes[index].accept(programClass, this, attributeVisitor);
    }
}
 
Example #9
Source File: Attribute.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
/**
 * Accepts the given visitor in the context of the given field.
 */
public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
{
    // Delegate the default invocation if the field is null anyway.
    if (field == null)
    {
        accept(clazz, attributeVisitor);
    }
    else
    {
        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
    }
}
 
Example #10
Source File: ProgramMethod.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
public void attributesAccept(ProgramClass programClass, AttributeVisitor attributeVisitor)
{
    for (int index = 0; index < u2attributesCount; index++)
    {
        attributes[index].accept(programClass, this, attributeVisitor);
    }
}
 
Example #11
Source File: ProgramClass.java    From java-n-IDE-for-Android with Apache License 2.0 5 votes vote down vote up
public void attributesAccept(AttributeVisitor attributeVisitor)
{
    for (int index = 0; index < u2attributesCount; index++)
    {
        attributes[index].accept(this, attributeVisitor);
    }
}
 
Example #12
Source File: ProgramMethod.java    From bazel with Apache License 2.0 5 votes vote down vote up
public void attributesAccept(ProgramClass programClass, AttributeVisitor attributeVisitor)
{
    for (int index = 0; index < u2attributesCount; index++)
    {
        attributes[index].accept(programClass, this, attributeVisitor);
    }
}
 
Example #13
Source File: AssumeClassSpecificationVisitorFactory.java    From proguard with GNU General Public License v2.0 5 votes vote down vote up
protected ClassVisitor createNonTestingClassVisitor(MemberSpecification memberSpecification,
                                                    boolean             isField,
                                                    MemberVisitor       memberVisitor,
                                                    AttributeVisitor    attributeVisitor,
                                                    WildcardManager wildcardManager)
{
    if (memberSpecification instanceof MemberValueSpecification)
    {
        // We can only know the value of this member specification at this
        // point.
        MemberValueSpecification memberValueSpecification =
            (MemberValueSpecification)memberSpecification;

        Number[] values = memberValueSpecification.values;
        if (values != null)
        {
            // Convert the Number array to a Value.
            Value value = value(values);

            // We're adding a member visitor to set the value.
            memberVisitor =
                new MultiMemberVisitor(
                    memberVisitor,
                    new OptimizationInfoMemberFilter(
                    new MyMemberValueSetter(value)));
        }
    }

    return super.createNonTestingClassVisitor(memberSpecification,
                                              isField,
                                              memberVisitor,
                                              attributeVisitor,
                                              wildcardManager);
}
 
Example #14
Source File: RuntimeInvisibleTypeAnnotationsAttribute.java    From bazel with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitRuntimeInvisibleTypeAnnotationsAttribute(clazz, field, this);
}
 
Example #15
Source File: RuntimeVisibleTypeAnnotationsAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitRuntimeVisibleTypeAnnotationsAttribute(clazz, method, codeAttribute, this);
}
 
Example #16
Source File: RuntimeVisibleTypeAnnotationsAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitRuntimeVisibleTypeAnnotationsAttribute(clazz, method, this);
}
 
Example #17
Source File: SourceDirAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitSourceDirAttribute(clazz, this);
}
 
Example #18
Source File: SyntheticAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitSyntheticAttribute(clazz, this);
}
 
Example #19
Source File: AnnotationDefaultAttribute.java    From bazel with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitAnnotationDefaultAttribute(clazz, method, this);
}
 
Example #20
Source File: RuntimeInvisibleTypeAnnotationsAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitRuntimeInvisibleTypeAnnotationsAttribute(clazz, this);
}
 
Example #21
Source File: RuntimeInvisibleTypeAnnotationsAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitRuntimeInvisibleTypeAnnotationsAttribute(clazz, method, codeAttribute, this);
}
 
Example #22
Source File: StackMapTableAttribute.java    From bazel with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitStackMapTableAttribute(clazz, method, codeAttribute, this);
}
 
Example #23
Source File: RuntimeInvisibleAnnotationsAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitRuntimeInvisibleAnnotationsAttribute(clazz, this);
}
 
Example #24
Source File: SignatureAttribute.java    From bazel with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitSignatureAttribute(clazz, this);
}
 
Example #25
Source File: SignatureAttribute.java    From proguard with GNU General Public License v2.0 4 votes vote down vote up
public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitSignatureAttribute(clazz, this);
}
 
Example #26
Source File: ChangedCodePrinter.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
public ChangedCodePrinter(AttributeVisitor attributeVisitor)
{
    this.attributeVisitor = attributeVisitor;
}
 
Example #27
Source File: RuntimeVisibleTypeAnnotationsAttribute.java    From bazel with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, Method method, CodeAttribute codeAttribute, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitRuntimeVisibleTypeAnnotationsAttribute(clazz, method, codeAttribute, this);
}
 
Example #28
Source File: SyntheticAttribute.java    From bazel with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitSyntheticAttribute(clazz, this);
}
 
Example #29
Source File: ExceptionsAttribute.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, Method method, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitExceptionsAttribute(clazz, method, this);
}
 
Example #30
Source File: ConstantValueAttribute.java    From java-n-IDE-for-Android with Apache License 2.0 4 votes vote down vote up
public void accept(Clazz clazz, Field field, AttributeVisitor attributeVisitor)
{
    attributeVisitor.visitConstantValueAttribute(clazz, field, this);
}