Class ImportNode

  • All Implemented Interfaces:
    org.objectweb.asm.Opcodes

    public class ImportNode
    extends AnnotatedNode
    implements org.objectweb.asm.Opcodes
    Represents an import statement of a single class
    • Constructor Detail

      • ImportNode

        public ImportNode​(ClassNode type,
                          String alias)
        Represent an import of an entire package, i.e. import package.Classname
        Parameters:
        type - the referenced class
        alias - optional alias
      • ImportNode

        public ImportNode​(String packageName)
        Represent an import of an entire package, i.e. import package.*
        Parameters:
        packageName - the name of the package
      • ImportNode

        public ImportNode​(ClassNode type)
        Represent a static import of a Class, i.e. import static package.Classname.*
        Parameters:
        type - the referenced class
      • ImportNode

        public ImportNode​(ClassNode type,
                          String fieldName,
                          String alias)
        Represent a static import of a field or method, i.e. import static package.Classname.name
        Parameters:
        type - the referenced class
        fieldName - the field name
        alias - optional alias
    • Method Detail

      • getText

        public String getText()
        Overrides:
        getText in class ASTNode
        Returns:
        the text display of this import
      • getPackageName

        public String getPackageName()
      • getFieldName

        public String getFieldName()
      • isStar

        public boolean isStar()
      • isStatic

        public boolean isStatic()
      • getAlias

        public String getAlias()
      • getClassName

        public String getClassName()