headroom-0.3.1.0: License Header Manager

Copyright(c) 2019-2020 Vaclav Svejcar
LicenseBSD-3-Clause
Maintainervaclav.svejcar@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Headroom.Ext.Java

Description

This module provides extended support for Java source code files. Current implementation includes extracting of package name from currently processed Java source code file.

Synopsis

Documentation

extractVariables Source #

Arguments

:: CtHeaderConfig

license header configuration

-> Maybe TemplateMeta

extracted metadata from corresponding template

-> Maybe (Int, Int)

license header position (startLine, endLine)

-> Text

input text

-> Variables

extracted variables

Extracts variables from Java source code.

List of Extracted Variables:

  • _java_package_name - name of the Java package

extractPackageName Source #

Arguments

:: Text

input text

-> Maybe Text

extracted package name

Extracts name of Java package from given source code file content.

>>> extractPackageName "package mypackage;\nclass Foo {}"
Just "mypackage"