~ubuntu-branches/ubuntu/wily/proguard/wily

« back to all changes in this revision

Viewing changes to src/proguard/evaluation/value/IdentifiedValueFactory.java

  • Committer: Package Import Robot
  • Author(s): Emmanuel Bourg
  • Date: 2014-04-10 13:58:11 UTC
  • mfrom: (1.2.5)
  • Revision ID: package-import@ubuntu.com-20140410135811-ddwzt2avu94rnolt
Tags: 4.11-1
* Team upload.
* New upstream release
* Removed the non-free documentation from the package (Closes: #719706)
* Removed the pre-built jars from the upstream tarball
* debian/control:
  - The package is now co-maintained with the Java Team
  - Standards-Version updated to 3.9.5 (no changes)
  - Added the Vcs-* fields
  - Added the Homepage field
* Switch to debhelper level 9
* Use XZ compression for the upstream tarball

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * ProGuard -- shrinking, optimization, obfuscation, and preverification
3
3
 *             of Java bytecode.
4
4
 *
5
 
 * Copyright (c) 2002-2012 Eric Lafortune (eric@graphics.cornell.edu)
 
5
 * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu)
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify it
8
8
 * under the terms of the GNU General Public License as published by the Free
21
21
package proguard.evaluation.value;
22
22
 
23
23
import proguard.classfile.*;
24
 
import proguard.classfile.util.ClassUtil;
25
24
 
26
25
/**
27
 
 * This class provides methods to create and reuse IntegerValue objects.
 
26
 * This particular value factory attaches a unique ID to any unknown values.
28
27
 *
29
28
 * @author Eric Lafortune
30
29
 */
31
30
public class IdentifiedValueFactory
32
 
extends      SpecificValueFactory
 
31
extends      ParticularValueFactory
33
32
{
34
 
    private int integerID;
35
 
    private int longID;
36
 
    private int floatID;
37
 
    private int doubleID;
38
 
    private int referenceID;
 
33
    protected int integerID;
 
34
    protected int longID;
 
35
    protected int floatID;
 
36
    protected int doubleID;
 
37
    protected int referenceID;
39
38
 
40
39
 
41
40
    // Implementations for ValueFactory.
70
69
    {
71
70
        return type == null ?
72
71
            REFERENCE_VALUE_NULL :
73
 
            new IdentifiedReferenceValue(type, referencedClass, mayBeNull, this, referenceID++);
 
72
            new IdentifiedReferenceValue(type,
 
73
                                         referencedClass,
 
74
                                         mayBeNull,
 
75
                                         this,
 
76
                                         referenceID++);
 
77
    }
 
78
 
 
79
 
 
80
    public ReferenceValue createArrayReferenceValue(String       type,
 
81
                                                    Clazz        referencedClass,
 
82
                                                    IntegerValue arrayLength)
 
83
    {
 
84
        return type == null ?
 
85
            REFERENCE_VALUE_NULL :
 
86
            new IdentifiedArrayReferenceValue(ClassConstants.INTERNAL_TYPE_ARRAY + type,
 
87
                                              referencedClass,
 
88
                                              arrayLength,
 
89
                                              this,
 
90
                                              referenceID++);
74
91
    }
75
92
}
 
 
b'\\ No newline at end of file'