當前位置: 首頁>>代碼示例>>Java>>正文


Java Visibility類代碼示例

本文整理匯總了Java中org.jboss.forge.roaster.model.Visibility的典型用法代碼示例。如果您正苦於以下問題:Java Visibility類的具體用法?Java Visibility怎麽用?Java Visibility使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


Visibility類屬於org.jboss.forge.roaster.model包,在下文中一共展示了Visibility類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: deserialize

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
/**
 * {@inheritDoc}
 */
@Override
public Visibility deserialize(@Nonnull JsonParser jsonParser, @Nonnull DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
    String name = jsonParser.getText().toUpperCase();

    if ("PACKAGE-PRIVATE".equals(name)) {
        return Visibility.PACKAGE_PRIVATE;
    }

    return Visibility.valueOf(name);
}
 
開發者ID:BasinMC,項目名稱:minecraft-maven-plugin,代碼行數:14,代碼來源:VisibilityJsonDeserializer.java

示例2: TransformationType

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@JsonCreator
private TransformationType(@Nullable @JsonProperty("visibility") Visibility visibility, @Nullable @JsonProperty("fields") Map<String, Visibility> fields, @Nullable @JsonProperty("methods") Map<String, Visibility> methods) {
    if (fields == null) {
        fields = new HashMap<>();
    }

    if (methods == null) {
        methods = new HashMap<>();
    }

    this.visibility = visibility;
    this.fields = fields;
    this.methods = methods;
}
 
開發者ID:BasinMC,項目名稱:minecraft-maven-plugin,代碼行數:15,代碼來源:TransformationType.java

示例3: read

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
/**
 * Reads an access transformation map from a supplied path.
 *
 * @throws IOException when accessing the file fails.
 */
@Nonnull
public static AccessTransformationMap read(@Nonnull Path path) throws IOException {
    ObjectMapper mapper = new ObjectMapper();

    {
        SimpleModule module = new SimpleModule("Access Transformation Serialization");
        module.addDeserializer(Visibility.class, new VisibilityJsonDeserializer());
        mapper.registerModule(module);
    }

    try (FileInputStream inputStream = new FileInputStream(path.toFile())) {
        return mapper.readValue(inputStream, AccessTransformationMap.class);
    }
}
 
開發者ID:BasinMC,項目名稱:minecraft-maven-plugin,代碼行數:20,代碼來源:AccessTransformationMap.java

示例4: setVisibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Override
public Object setVisibility(Visibility scope) {
    return null;
}
 
開發者ID:fabric8io,項目名稱:fabric8-forge,代碼行數:5,代碼來源:StatementFieldSource.java

示例5: getVisibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Override
public Visibility getVisibility() {
    return null;
}
 
開發者ID:fabric8io,項目名稱:fabric8-forge,代碼行數:5,代碼來源:StatementFieldSource.java

示例6: setVisibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Override
public MethodSource<JavaClassSource> setVisibility(Visibility visibility) {
    return null;
}
 
開發者ID:fabric8io,項目名稱:fabric8-forge,代碼行數:5,代碼來源:AnonymousMethodSource.java

示例7: visibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Override
public Visibility visibility() {
	return PUBLIC;
}
 
開發者ID:robsonbittencourt,項目名稱:utility-generator,代碼行數:5,代碼來源:MapperTesterShouldTestAllParamsMethod.java

示例8: visibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Override
public Visibility visibility() {
	return PRIVATE;
}
 
開發者ID:robsonbittencourt,項目名稱:utility-generator,代碼行數:5,代碼來源:FixtureBaseField.java

示例9: visibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Override
public Visibility visibility() {
	return Visibility.PUBLIC;
}
 
開發者ID:robsonbittencourt,項目名稱:utility-generator,代碼行數:5,代碼來源:FixtureWithRandomValueMethod.java

示例10: shouldBeAPublicMethod

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Test
public void shouldBeAPublicMethod() {
	assertEquals(Visibility.PUBLIC, method.visibility());
}
 
開發者ID:robsonbittencourt,項目名稱:utility-generator,代碼行數:5,代碼來源:MapperTesterShouldTestAllParamsMethodTest.java

示例11: shouldBeAPublicField

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
@Test
public void shouldBeAPublicField() {
	assertEquals(Visibility.PRIVATE, field.visibility());
}
 
開發者ID:robsonbittencourt,項目名稱:utility-generator,代碼行數:5,代碼來源:FixtureBaseFieldTest.java

示例12: getFieldVisibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
/**
 * Retrieves the altered visibility for a field of a specific name (if any).
 */
@Nonnull
public Optional<Visibility> getFieldVisibility(@Nonnull String fieldName) {
    return Optional.ofNullable(this.fields.get(fieldName));
}
 
開發者ID:BasinMC,項目名稱:minecraft-maven-plugin,代碼行數:8,代碼來源:TransformationType.java

示例13: getMethodVisibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
/**
 * Retrieves the altered visibility for a method of a specific name (if any).
 */
@Nonnull
public Optional<Visibility> getMethodVisibility(@Nonnull String methodName) {
    return Optional.ofNullable(this.methods.get(methodName));
}
 
開發者ID:BasinMC,項目名稱:minecraft-maven-plugin,代碼行數:8,代碼來源:TransformationType.java

示例14: getVisibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
/**
 * Retrieves the type visibility.
 */
@Nonnull
public Optional<Visibility> getVisibility() {
    return Optional.ofNullable(this.visibility);
}
 
開發者ID:BasinMC,項目名稱:minecraft-maven-plugin,代碼行數:8,代碼來源:TransformationType.java

示例15: visibility

import org.jboss.forge.roaster.model.Visibility; //導入依賴的package包/類
Visibility visibility(); 
開發者ID:robsonbittencourt,項目名稱:utility-generator,代碼行數:2,代碼來源:GeneratedMethod.java


注:本文中的org.jboss.forge.roaster.model.Visibility類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。