Package hudson.model

Class Fingerprint.BuildPtr

  • Enclosing class:
    Fingerprint

    @ExportedBean(defaultVisibility=2)
    public static class Fingerprint.BuildPtr
    extends Object
    Pointer to a Build.
    • Constructor Detail

      • BuildPtr

        public BuildPtr​(String name,
                        int number)
      • BuildPtr

        public BuildPtr​(Run run)
    • Method Detail

      • getName

        @Exported
        @NonNull
        public String getName()
        Gets the full name of the job. Such job could be since then removed, so there might not be a corresponding Job.
        Returns:
        A name of the job
      • getJob

        @WithBridgeMethods(value=AbstractProject.class,
                           castRequired=true)
        public Job<?,​?> getJob()
        Gets the Job that this pointer points to, or null if such a job no longer exists.
      • getNumber

        @Exported
        @NonNull
        public int getNumber()
        Gets the project build number.

        Such Run could be since then discarded.

        Returns:
        A build number
      • getRun

        public Run getRun()
        Gets the Job that this pointer points to, or null if such a job no longer exists.
      • belongsTo

        public boolean belongsTo​(Job job)
        Returns true if Fingerprint.BuildPtr points to the given job or one of its subordinates.

        This is useful to check if an artifact in MavenModule belongs to MavenModuleSet.