Class AttributeNode

java.lang.Object
com.github.weisj.jsvg.parser.impl.AttributeNode

public final class AttributeNode extends Object
  • Field Details

    • TopOrLeft

      private static final Length TopOrLeft
    • Center

      private static final Length Center
    • BottomOrRight

      private static final Length BottomOrRight
    • FALLBACK_LENGTH

      private static final Length FALLBACK_LENGTH
    • FALLBACK_PERCENTAGE

      private static final Percentage FALLBACK_PERCENTAGE
    • DUMMY_MEASURE_CONTEXT

      private static final MeasureContext DUMMY_MEASURE_CONTEXT
    • tagName

      @NotNull private final @NotNull String tagName
    • attributes

      @NotNull private final @NotNull Map<String,String> attributes
    • styleSheets

      @NotNull private final @NotNull List<@NotNull StyleSheet> styleSheets
    • element

      private ParsedElement element
  • Constructor Details

    • AttributeNode

      public AttributeNode(@NotNull @NotNull String tagName, @NotNull @NotNull Map<String,String> attributes, @NotNull @NotNull List<@NotNull StyleSheet> styleSheets)
  • Method Details

    • setElement

      void setElement(ParsedElement element)
    • loadHelper

      @NotNull private @NotNull LoadHelper loadHelper()
    • copy

      @NotNull public @NotNull AttributeNode copy()
    • prepareForNodeBuilding

      void prepareForNodeBuilding()
    • isBlank

      private static boolean isBlank(@NotNull @NotNull String s)
    • preprocessAttributes

      private static void preprocessAttributes(@NotNull @NotNull Map<String,String> attributes, @NotNull @NotNull Map<String,String> styleAttributes)
    • document

      @NotNull public @NotNull ParsedDocument document()
    • element

      @NotNull public @NotNull ParsedElement element()
    • styleSheets

      @NotNull @NotNull List<@NotNull StyleSheet> styleSheets()
    • getElementByUrl

      @Nullable private <T> T getElementByUrl(@NotNull @NotNull Class<T> type, @Nullable @Nullable String value)
    • recordIndirectChild

      private <T> T recordIndirectChild(T child, String value, AttributeNode.ElementRelation relation)
    • getElementByHref

      @Nullable public <T> T getElementByHref(@NotNull @NotNull Class<T> type, @Nullable @Nullable String value, AttributeNode.ElementRelation relation)
    • getElementByHref

      @Nullable public <T> T getElementByHref(@NotNull @NotNull Class<T> type, @NotNull @NotNull Category category, @Nullable @Nullable String value, AttributeNode.ElementRelation relation)
    • attributes

      @NotNull public @NotNull Map<String,String> attributes()
    • tagName

      @NotNull public @NotNull String tagName()
    • tagIsOneOf

      public boolean tagIsOneOf(@NotNull @NotNull String... tags)
    • classNames

      @NotNull public @NotNull List<@NotNull String> classNames()
    • getValue

      @Nullable public @Nullable String getValue(@NotNull @NotNull String key)
    • getColor

      @NotNull public @NotNull Color getColor(@NotNull @NotNull String key)
    • getColor

      @Contract("_,!null -> !null") @Nullable public @Nullable Color getColor(@NotNull @NotNull String key, @Nullable @Nullable Color fallback)
    • getPaint

      @Nullable public @Nullable SVGPaint getPaint(@NotNull @NotNull String key, Inherited inherited, Animatable animatable)
    • getPaint

      @Contract("_,!null,_,_ -> !null") @Nullable public @Nullable SVGPaint getPaint(@NotNull @NotNull String key, @Nullable @Nullable SVGPaint fallback, Inherited inherited, Animatable animatable)
    • getPaintInternal

      @Contract("_,!null -> !null") @Nullable private @Nullable SVGPaint getPaintInternal(@NotNull @NotNull String key, @Nullable @Nullable SVGPaint fallback)
    • parsePaint

      @Nullable public @Nullable SVGPaint parsePaint(@Nullable @Nullable String value)
    • getLength

      @Nullable public @Nullable Length getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension)
    • getLength

      @NotNull public @NotNull Length getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, float fallback)
    • getLength

      @Contract("_,_,!null -> !null") @Nullable public @Nullable Length getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, @Nullable @Nullable Length fallback)
    • getLength

      @Nullable public @Nullable LengthValue getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, Inherited inherited, Animatable animatable)
    • getLength

      @Contract("_,_,!null,_,_ -> !null") @Nullable public @Nullable LengthValue getLength(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension, @Nullable @Nullable LengthValue fallback, Inherited inherited, Animatable animatable)
    • getDuration

      @NotNull public @NotNull Duration getDuration(@NotNull @NotNull String key, @NotNull @NotNull Duration fallback)
    • getLengthInternal

      @NotNull private @NotNull Length getLengthInternal(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension)
    • getHorizontalReferenceLength

      @NotNull public @NotNull Length getHorizontalReferenceLength(@NotNull @NotNull String key)
    • getVerticalReferenceLength

      @NotNull public @NotNull Length getVerticalReferenceLength(@NotNull @NotNull String key)
    • parseReferenceLength

      @NotNull private @NotNull Length parseReferenceLength(@NotNull @NotNull String key, @NotNull @NotNull String topLeft, @NotNull @NotNull String bottomRight, @NotNull @NotNull PercentageDimension dimension)
    • getPercentage

      @Contract("_,!null -> !null") @Nullable public @Nullable Percentage getPercentage(@NotNull @NotNull String key, @Nullable @Nullable Percentage fallback)
    • getPercentage

      @Nullable public @Nullable PercentageValue getPercentage(@NotNull @NotNull String key, Inherited inherited, Animatable animatable)
    • getPercentage

      @Contract("_,!null,_,_ -> !null") @Nullable public @Nullable PercentageValue getPercentage(@NotNull @NotNull String key, @Nullable @Nullable PercentageValue fallback, Inherited inherited, Animatable animatable)
    • getLengthList

      @NotNull public @NotNull Length @NotNull [] getLengthList(@NotNull @NotNull String key, @NotNull @NotNull PercentageDimension dimension)
    • getLengthList

      @Contract("_,!null,_ -> !null") @NotNull public @NotNull Length @Nullable [] getLengthList(@NotNull @NotNull String key, @NotNull @NotNull Length @Nullable [] fallback, @NotNull @NotNull PercentageDimension dimension)
    • getFloatList

      public float @NotNull [] getFloatList(@NotNull @NotNull String key)
    • getFloatList

      @NotNull public @NotNull FloatListValue getFloatList(@NotNull @NotNull String key, Inherited inherited, Animatable animatable)
    • getDoubleList

      public double @NotNull [] getDoubleList(@NotNull @NotNull String key)
    • getEnum

      @NotNull public <E extends Enum<E>> E getEnum(@NotNull @NotNull String key, @NotNull E fallback)
    • getEnumNullable

      @Nullable public <E extends Enum<E>> E getEnumNullable(@NotNull @NotNull String key, @NotNull @NotNull Class<E> enumType)
    • getClipPath

      @Nullable public @Nullable ClipPath getClipPath()
    • getMask

      @Nullable public @Nullable Mask getMask()
    • getFilter

      @Nullable public @Nullable Filter getFilter()
    • getFilterChannelKey

      @NotNull public @NotNull FilterChannelKey getFilterChannelKey(@NotNull @NotNull String key, @NotNull @NotNull FilterChannelKey fallback)
    • parseTransform

      @Nullable public @Nullable TransformValue parseTransform(@NotNull @NotNull String key)
    • createTransformValueFromParts

      @NotNull private @NotNull TransformValue createTransformValueFromParts(@NotNull @NotNull List<TransformPart> parts)
    • parseTransform

      @Nullable public @Nullable TransformValue parseTransform(@NotNull @NotNull String key, Inherited inherited, Animatable animatable)
    • hasAttribute

      public boolean hasAttribute(@NotNull @NotNull String name)
    • getStringList

      @NotNull public @NotNull String @NotNull [] getStringList(@NotNull @NotNull String name)
    • getStringList

      @NotNull public @NotNull String @NotNull [] getStringList(@NotNull @NotNull String name, SeparatorMode separatorMode)
    • getFloat

      public float getFloat(@NotNull @NotNull String name, float fallback)
    • getNonNegativeFloat

      public float getNonNegativeFloat(@NotNull @NotNull String name, float fallback)
    • getInt

      public int getInt(@NotNull @NotNull String key, int fallback)
    • getHref

      @Nullable public @Nullable String getHref()
    • getViewBox

      @Nullable public @Nullable ViewBox getViewBox()
    • parser

      @NotNull public @NotNull AttributeParser parser()
    • resourceLoader

      @NotNull public @NotNull ResourceLoader resourceLoader()
    • resolveResourceURI

      @Nullable public @Nullable URI resolveResourceURI(@NotNull @NotNull String url)
    • animateNodes

      private <T extends BaseAnimationNode> List<@NotNull T> animateNodes(@NotNull @NotNull String property, Class<T> type)
    • makeAnimated

      @Nullable private static <T, A extends T, N extends BaseAnimationNode> A makeAnimated(@NotNull @NotNull List<N> animationNodes, @NotNull T initial, @NotNull @NotNull BiFunction<N,T,A> factory)
    • getAnimatedLength

      @Nullable public @Nullable AnimatedLength getAnimatedLength(@NotNull @NotNull String property, @NotNull @NotNull LengthValue initial, @NotNull @NotNull PercentageDimension dimension)
    • getAnimatedFloatList

      @Nullable private @Nullable AnimatedFloatList getAnimatedFloatList(@NotNull @NotNull String property, @NotNull @NotNull FloatListValue initial)
    • getAnimatedPercentage

      @Nullable private @Nullable AnimatedPercentage getAnimatedPercentage(@NotNull @NotNull String property, @NotNull @NotNull PercentageValue initial)
    • getAnimatedPaint

      @Nullable private @Nullable AnimatedPaint getAnimatedPaint(@NotNull @NotNull String property, @NotNull @NotNull SVGPaint initial)
    • getAnimatedColor

      @Nullable public @Nullable AnimatedColor getAnimatedColor(@NotNull @NotNull String property, @NotNull @NotNull ColorValue initial)
    • getAnimatedTransform

      @Nullable public @Nullable AnimatedTransform getAnimatedTransform(@NotNull @NotNull String property, @NotNull @NotNull TransformValue initial)