Package org.openrewrite.docker.tree
Class Docker.Port
java.lang.Object
org.openrewrite.docker.tree.Docker.Port
- All Implemented Interfaces:
Docker,org.openrewrite.Tree
- Enclosing interface:
Docker
A port specification in an EXPOSE instruction.
Supports formats: 80, 80/tcp, 80/udp, 8000-9000, 8000-9000/tcp, ${PORT}
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.openrewrite.docker.tree.Docker
Docker.Add, Docker.Arg, Docker.Argument, Docker.ArgumentContent, Docker.Cmd, Docker.CommandForm, Docker.Copy, Docker.CopyAddForm, Docker.CopyShellForm, Docker.Entrypoint, Docker.Env, Docker.EnvironmentVariable, Docker.ExecForm, Docker.Expose, Docker.File, Docker.Flag, Docker.From, Docker.Healthcheck, Docker.HeredocBody, Docker.HeredocForm, Docker.Instruction, Docker.Label, Docker.Literal, Docker.Maintainer, Docker.Onbuild, Docker.Port, Docker.Run, Docker.Shell, Docker.ShellForm, Docker.Stage, Docker.Stopsignal, Docker.User, Docker.Volume, Docker.Workdir -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<P> DockeracceptDocker(DockerVisitor<P> v, P p) booleanisRange()Returns true if this is a port range (e.g., 8000-9000)booleanReturns true if this port specification contains environment variables and the actual port number is not known at parse time.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.openrewrite.docker.tree.Docker
accept, getPrefix, isAcceptable, withPrefixMethods inherited from interface org.openrewrite.Tree
cast, getId, getMarkers, isScope, print, print, print, printer, printTrimmed, printTrimmed, printTrimmed, withId, withMarkers
-
Constructor Details
-
Port
public Port()
-
-
Method Details
-
acceptDocker
- Specified by:
acceptDockerin interfaceDocker
-
isVariable
public boolean isVariable()Returns true if this port specification contains environment variables and the actual port number is not known at parse time. -
isRange
public boolean isRange()Returns true if this is a port range (e.g., 8000-9000)
-