repo_id
stringclasses
875 values
size
int64
974
38.9k
file_path
stringlengths
10
308
content
stringlengths
974
38.9k
apache/maven-javadoc-plugin
1,108
src/it/projects/MJAVADOC-449_aggr_modulepath/moduleb/src/main/java/com/javamodularity/moduleb/HelloWorld.java
package com.javamodularity.moduleb; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * <p>Javadoc aggregation from module a.</p> */ public class HelloWorld { /** * <p>method f does something</p> */ public void f() { } public static void main(String... args) { System.out.println("Hello Modular World!"); } }
apache/maven-plugins
1,111
maven-javadoc-plugin/src/test/resources/unit/custom-configuration/custom/configuration/exclude2/Exclude2App.java
package custom.configuration.exclude2; /* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Sample class */ public class Exclude2App { public static void main( String[] args ) { System.out.println( "Sample Application." ); } protected void sampleMethod( String str ) { System.out.println( str ); } }
apache/maven
1,151
compat/maven-compat/src/main/java/org/apache/maven/reporting/MavenReportException.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.maven.reporting; /** * An exception occurring during the execution of a Maven report. * */ @Deprecated public class MavenReportException extends Exception { public MavenReportException(String msg) { super(msg); } public MavenReportException(String msg, Exception e) { super(msg, e); } }
apache/maven
1,153
api/maven-api-core/src/main/java/org/apache/maven/api/services/xml/PluginXmlFactory.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.maven.api.services.xml; import org.apache.maven.api.annotations.Experimental; import org.apache.maven.api.plugin.descriptor.PluginDescriptor; /** * Reads and writes a {@link PluginDescriptor} object to/from XML. * * @since 4.0.0 */ @Experimental public interface PluginXmlFactory extends XmlFactory<PluginDescriptor> {}
apache/metamodel
1,156
core/src/main/java/org/apache/metamodel/query/builder/SatisfiedHavingBuilder.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.metamodel.query.builder; import org.apache.metamodel.query.FunctionType; import org.apache.metamodel.schema.Column; public interface SatisfiedHavingBuilder extends GroupedQueryBuilder { public HavingBuilder or(FunctionType functionType, Column column); public HavingBuilder and(FunctionType functionType, Column column); }
apache/metron
1,141
metron-interface/metron-rest/src/main/java/org/apache/metron/rest/service/GlobalConfigService.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.metron.rest.service; import org.apache.metron.rest.RestException; import java.util.Map; public interface GlobalConfigService { Map<String, Object> save(Map<String, Object> globalConfig) throws RestException; Map<String, Object> get() throws RestException; boolean delete() throws RestException; }
apache/mina-sshd
1,152
sshd-core/src/main/java/org/apache/sshd/server/forward/AcceptAllForwardingFilter.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sshd.server.forward; /** * A {@link ForwardingFilter} that accepts all requests */ public class AcceptAllForwardingFilter extends StaticDecisionForwardingFilter { public static final AcceptAllForwardingFilter INSTANCE = new AcceptAllForwardingFilter(); public AcceptAllForwardingFilter() { super(true); } }
apache/myfaces
1,161
api/src/main/java/jakarta/faces/view/ActionSource2AttachedObjectTarget.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package jakarta.faces.view; /** * A marker interface for PDL tags that represent <code>&lt;composite:actionSource/&gt;</code> for use by the * <em>composite component page author</em>. * * @since 2.0 */ @Deprecated(since = "4.1", forRemoval = true) public interface ActionSource2AttachedObjectTarget extends ActionSourceAttachedObjectTarget { }
apache/nifi-minifi
1,128
minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/FunnelSchema.java
/* * * * Licensed to the Apache Software Foundation (ASF) under one or more * * contributor license agreements. See the NOTICE file distributed with * * this work for additional information regarding copyright ownership. * * The ASF licenses this file to You under the Apache License, Version 2.0 * * (the "License"); you may not use this file except in compliance with * * the License. You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * */ package org.apache.nifi.minifi.commons.schema; import org.apache.nifi.minifi.commons.schema.common.BaseSchemaWithId; import java.util.Map; public class FunnelSchema extends BaseSchemaWithId { public FunnelSchema(Map map) { super(map, "Funnel(id: {id})"); } }
apache/nifi
1,050
nifi-framework-bundle/nifi-framework-extensions/nifi-py4j-framework-bundle/nifi-python-framework-api/src/main/java/org/apache/nifi/python/processor/documentation/ProcessorConfigurationDetails.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.python.processor.documentation; import org.apache.nifi.python.PythonObjectProxy; public interface ProcessorConfigurationDetails extends PythonObjectProxy { String getProcessorType(); String getConfiguration(); }
apache/nifi
1,126
minifi/minifi-bootstrap/src/main/java/org/apache/nifi/minifi/bootstrap/configuration/ConfigurationChangeNotifier.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.minifi.bootstrap.configuration; import java.nio.ByteBuffer; import java.util.Collection; public interface ConfigurationChangeNotifier { /** * Provides the mechanism by which listeners are notified */ Collection<ListenerHandleResult> notifyListeners(ByteBuffer newFlowConfig); }
apache/nifi
1,128
minifi/minifi-toolkit/minifi-toolkit-schema/src/main/java/org/apache/nifi/minifi/toolkit/schema/FunnelSchema.java
/* * * * Licensed to the Apache Software Foundation (ASF) under one or more * * contributor license agreements. See the NOTICE file distributed with * * this work for additional information regarding copyright ownership. * * The ASF licenses this file to You under the Apache License, Version 2.0 * * (the "License"); you may not use this file except in compliance with * * the License. You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * */ package org.apache.nifi.minifi.toolkit.schema; import org.apache.nifi.minifi.toolkit.schema.common.BaseSchemaWithId; import java.util.Map; public class FunnelSchema extends BaseSchemaWithId { public FunnelSchema(Map map) { super(map, "Funnel(id: {id})"); } }
apache/nifi
1,139
nifi-framework-api/src/main/java/org/apache/nifi/nar/NarPersistenceProviderInitializationContext.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.nifi.nar; import java.util.Map; /** * Initialization context for a {@link NarPersistenceProvider}. */ public interface NarPersistenceProviderInitializationContext { /** * @return the properties that have been configured for the NarManager */ Map<String, String> getProperties(); }
apache/openjpa
1,122
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/UnknownSubclassParent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.jdbc.common.apps; public class UnknownSubclassParent { private String parentString; public void setParentString(String parentString) { this.parentString = parentString; } public String getParentString() { return this.parentString; } }
apache/openjpa
1,125
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/meta/common/apps/FieldOrderPCSubclass.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.meta.common.apps; import jakarta.persistence.Entity; @Entity public class FieldOrderPCSubclass extends FieldOrderPC { private transient String sub1; private int sub2; private Double sub3; private int unmanagedSubField; private int undeclaredSubField; }
apache/openjpa
1,126
openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/jdbc/common/apps/OpOrder.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.persistence.jdbc.common.apps; import java.util.List; public interface OpOrder { long getId(); OpOrder getRel(); OpOrder getOwner(); String getSecondary(); String getSub(); List getRelList(); List getMappedRelList(); List getInverseKeyRelList(); }
apache/openjpa
1,158
openjpa-kernel/src/main/java/org/apache/openjpa/kernel/exps/Expression.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.openjpa.kernel.exps; import java.io.Serializable; /** * Interface for a set of conditions that must be met for the query * to be true. * * @author Abe White */ public interface Expression extends Serializable { /** * Accept a visit from a tree visitor. */ void acceptVisit(ExpressionVisitor visitor); }
apache/openwebbeans-meecrowave
1,150
meecrowave-core/src/main/java/org/apache/meecrowave/api/StopListening.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.meecrowave.api; import org.apache.catalina.Context; import org.apache.catalina.Host; import org.apache.catalina.connector.Connector; public class StopListening extends ListeningBase { public StopListening(final Connector connector, final Host host, final Context context) { super(connector, host, context); } }
apache/openwebbeans
1,111
webbeans-impl/src/test/java/org/apache/webbeans/test/interceptors/factory/beans/InterfaceWithInterceptors.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.webbeans.test.interceptors.factory.beans; import org.apache.webbeans.test.component.intercept.webbeans.bindings.Transactional; public interface InterfaceWithInterceptors { @Transactional String getName(); @Transactional default String getDefaultName() { return "John Doe"; } }
apache/ozhera
1,123
ozhera-monitor/ozhera-monitor-service/src/main/java/org/apache/ozhera/monitor/dao/model/AlarmHealthQuery.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.ozhera.monitor.dao.model; import lombok.Data; import lombok.ToString; /** * @author gaoxihui * @date 2022/4/19 5:01 PM */ @Data @ToString public class AlarmHealthQuery { private String appName; private String owner; private Integer projectId; private Integer appSource; }
apache/paimon-webui
1,137
paimon-web-server/src/main/java/org/apache/paimon/web/server/data/enums/CatalogMode.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.paimon.web.server.data.enums; /** Enum representing different catalog modes. */ public enum CatalogMode { FILESYSTEM("filesystem"), HIVE("hive"); private final String mode; CatalogMode(String mode) { this.mode = mode; } public String getMode() { return mode; } }
apache/pig
1,201
src/org/apache/pig/builtin/ASIN.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.pig.builtin; /** * ASIN implements a binding to the Java function * {@link java.lang.Math#asin(double) Math.asin(double)} for computing the * arc sine of value of the argument. The returned value will be a double which is * the arc sine of the value of input. * */ public class ASIN extends DoubleBase{ Double compute(Double input){ return Math.asin(input); } }
apache/plc4x
1,128
plc4j/utils/test-utils/src/main/java/org/apache/plc4x/test/driver/internal/handlers/IncomingPlcBytesHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.test.driver.internal.handlers; import org.apache.commons.lang3.NotImplementedException; public class IncomingPlcBytesHandler { public void executeIncomingPlcBytes() { // TODO: Implement throw new NotImplementedException("incoming-plc-bytes not implemented yet"); } }
apache/plc4x
1,134
plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/ets/filehandlers/Ets5FileHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.knxnetip.ets.filehandlers; import net.lingala.zip4j.ZipFile; import java.io.File; public class Ets5FileHandler implements EtsFileHandler { @Override public ZipFile getProjectFiles(File archive, String password) { return new ZipFile(archive, password.toCharArray()); } }
apache/plc4x
1,160
plc4j/api/src/main/java/org/apache/plc4x/java/api/model/PlcDiscoveryHandler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.plc4x.java.api.model; import org.apache.plc4x.java.api.messages.PlcDiscoveryItem; public interface PlcDiscoveryHandler { /** * Callback that gets called as soon as we found a new PlcDiscoveryItem * @param item a PlcDiscoveryItem identifying a newly found resource */ void handle(PlcDiscoveryItem item); }
apache/polygene-java
1,114
libraries/sql-generator/src/main/java/org/apache/polygene/library/sql/generator/implementation/transformation/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ /** * This package contains the default processors for syntax elements defined in API. The vendor uses these processors (or custom processors) to create textual SQL statement out of API syntax elements. */ package org.apache.polygene.library.sql.generator.implementation.transformation;
apache/polygene-java
1,130
extensions/indexing-rdf/src/main/java/org/apache/polygene/index/rdf/assembly/RdfIndexingAssembler.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.index.rdf.assembly; /** * This is a dummy Assembler to support the Yeoman Polygene Generator, which require naming conventions for * the systems that it supports. */ @SuppressWarnings( "unused" ) public class RdfIndexingAssembler extends RdfNativeSesameStoreAssembler { }
apache/polygene-java
1,137
extensions/cache-ehcache/src/main/java/org/apache/polygene/cache/ehcache/EhCachePoolService.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * */ package org.apache.polygene.cache.ehcache; import org.apache.polygene.api.mixin.Mixins; import org.apache.polygene.api.service.ServiceActivation; import org.apache.polygene.spi.cache.CachePool; @Mixins( EhCachePoolMixin.class ) public interface EhCachePoolService extends CachePool, ServiceActivation { }
apache/pulsar
1,123
tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/java/PulsarFunctionsJavaProcessTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.pulsar.tests.integration.functions.java; import org.apache.pulsar.tests.integration.topologies.FunctionRuntimeType; public class PulsarFunctionsJavaProcessTest extends PulsarFunctionsJavaTest { public PulsarFunctionsJavaProcessTest() { super(FunctionRuntimeType.PROCESS); } }
apache/qpid-broker-j
1,147
broker-core/src/main/java/org/apache/qpid/server/model/ManagedContextDependency.java
package org.apache.qpid.server.model;/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE}) public @interface ManagedContextDependency { String[] value(); }
apache/qpid-broker-j
1,155
broker-core/src/main/java/org/apache/qpid/server/model/JsonSystemConfig.java
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. * */ package org.apache.qpid.server.model; import org.apache.qpid.server.store.FileBasedSettings; public interface JsonSystemConfig<X extends JsonSystemConfig<X>> extends SystemConfig<X>, FileBasedSettings { @Override @ManagedAttribute( defaultValue = "${qpid.work_dir}${file.separator}config.json") public String getStorePath(); }
apache/reef
1,135
lang/java/reef-io/src/main/java/org/apache/reef/io/network/naming/parameters/NameResolverCacheTimeout.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.reef.io.network.naming.parameters; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; @NamedParameter(doc = "How much time name lookup client caching(msec)?", default_value = "30000") public final class NameResolverCacheTimeout implements Name<Long> { }
apache/rocketmq
1,150
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/subscription/RetryPolicy.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.rocketmq.remoting.protocol.subscription; public interface RetryPolicy { /** * Compute message's next delay duration by specify reconsumeTimes * * @param reconsumeTimes Message reconsumeTimes * @return Message's nextDelayDuration in milliseconds */ long nextDelayDuration(int reconsumeTimes); }
apache/royale-compiler
1,143
debugger/src/main/java/flash/tools/debugger/events/StackUnderFlowFault.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package flash.tools.debugger.events; /** * Signals that a stack underflow has occurred. */ public class StackUnderFlowFault extends FaultEvent { public StackUnderFlowFault(int isolateId) { super(isolateId); } public final static String name = "stack_underflow"; //$NON-NLS-1$ @Override public String name() { return name; } }
apache/seatunnel
1,107
seatunnel-connectors-v2/connector-milvus/src/main/java/org/apache/seatunnel/connectors/seatunnel/milvus/state/MilvusCommitInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.connectors.seatunnel.milvus.state; import lombok.AllArgsConstructor; import lombok.Data; import java.io.Serializable; @Data @AllArgsConstructor public class MilvusCommitInfo implements Serializable { private static final long serialVersionUID = 3466351676745438435L; }
apache/seatunnel
1,139
seatunnel-api/src/main/java/org/apache/seatunnel/api/sink/multitablesink/MultiTableCommitInfo.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.seatunnel.api.sink.multitablesink; import lombok.AllArgsConstructor; import lombok.Getter; import java.io.Serializable; import java.util.concurrent.ConcurrentMap; @Getter @AllArgsConstructor public class MultiTableCommitInfo implements Serializable { private ConcurrentMap<SinkIdentifier, Object> commitInfo; }
apache/servicecomb-java-chassis
1,088
swagger/swagger-generator/generator-core/src/test/java/org/apache/servicecomb/swagger/generator/core/utils/paramUtilsModel/IMyService.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.swagger.generator.core.utils.paramUtilsModel; import java.util.List; import org.springframework.web.multipart.MultipartFile; public interface IMyService extends IBaseService<PersonBean> { List<MultipartFile> parentHello(List<MultipartFile> bean); }
apache/servicecomb-java-chassis
1,090
foundations/foundation-protobuf/src/test/java/org/apache/servicecomb/foundation/protobuf/internal/schema/scalar/TestDoubleSchema.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.foundation.protobuf.internal.schema.scalar; public class TestDoubleSchema extends TestNumberBaseSchema { public TestDoubleSchema() { minValue = Double.MIN_VALUE; maxValue = Double.MAX_VALUE; initFields("doubleValue", "objDoubleValue"); } }
apache/servicecomb-java-chassis
1,107
service-registry/registry-consul/src/main/java/org/apache/servicecomb/registry/consul/ConsulRegistrationInstance.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.registry.consul; import org.apache.servicecomb.registry.api.RegistrationInstance; public class ConsulRegistrationInstance extends ConsulInstance implements RegistrationInstance { public ConsulRegistrationInstance(ConsulInstance instance) { super(instance); } }
apache/servicecomb-java-chassis
1,130
governance/src/test/java/org/apache/servicecomb/governance/mockclasses/ClassNotImplements.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.governance.mockclasses; import org.springframework.stereotype.Component; import org.apache.servicecomb.governance.marker.GovernanceRequest; @Component public class ClassNotImplements { public boolean matchRequest(GovernanceRequest request, String parameters) { return true; } }
apache/servicecomb-pack
1,105
acceptance-tests/acceptance-pack-spring-demo-with-zookeeper/src/test/java/org/apache/servicecomb/pack/RunCucumberIT.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.servicecomb.pack; import org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith(Cucumber.class) @CucumberOptions(plugin = {"pretty", "html:target/cucumber"}, features = "src/test/resources") public class RunCucumberIT { }
apache/servicemix
1,141
examples/cxf/cxf-osgi/src/main/java/org/apache/servicemix/examples/cxf/HelloWorldImpl.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ // START SNIPPET: service package org.apache.servicemix.examples.cxf; import javax.jws.WebService; @WebService(endpointInterface = "org.apache.servicemix.examples.cxf.HelloWorld") public class HelloWorldImpl implements HelloWorld { public String sayHi(String text) { return "Hello " + text; } } // END SNIPPET: service
apache/shardingsphere
1,106
test/it/parser/src/main/java/org/apache/shardingsphere/test/it/sql/parser/internal/cases/parser/jaxb/statement/tcl/XATestCase.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.tcl; import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.SQLParserTestCase; /** * Set transaction statement test case. */ public final class XATestCase extends SQLParserTestCase { }
apache/shenyu
1,149
shenyu-admin/src/test/java/org/apache/shenyu/admin/model/query/DashboardUserQueryTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.admin.model.query; import org.apache.shenyu.admin.AbstractReflectGetterSetterTest; /** * Test case for DashboardUserQuery. */ public final class DashboardUserQueryTest extends AbstractReflectGetterSetterTest { @Override protected Class<?> getTargetClass() { return DashboardUserQuery.class; } }
apache/shenyu
1,149
shenyu-admin/src/test/java/org/apache/shenyu/admin/model/query/RuleConditionQueryTest.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.admin.model.query; import org.apache.shenyu.admin.AbstractReflectGetterSetterTest; /** * Test case for RuleConditionQuery. */ public final class RuleConditionQueryTest extends AbstractReflectGetterSetterTest { @Override protected Class<?> getTargetClass() { return RuleConditionQuery.class; } }
apache/shenyu
1,151
shenyu-common/src/main/java/org/apache/shenyu/common/dto/convert/rule/RuleHandle.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.shenyu.common.dto.convert.rule; import org.apache.shenyu.common.utils.GsonUtils; /** * The RuleHandle interface. */ public interface RuleHandle { /** * Format this object to json string. * @return json string. */ default String toJson() { return GsonUtils.getGson().toJson(this); } }
apache/shiro
1,167
crypto/hash/src/main/java/org/apache/shiro/crypto/hash/format/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ /** * Cryptographic Hashing components that greatly simplify one-way data hashing in an application. * <p/> * The {@link org.apache.shiro.crypto.hash.Hash Hash} interface and its implementations are significantly * easier to understand and use compared to the JDK's <code>MessageDigest</code> mechanism. */ package org.apache.shiro.crypto.hash.format;
apache/sis
1,148
endorsed/src/org.apache.sis.profile.japan/main/org/apache/sis/profile/japan/netcdf/package-info.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * Extensions to netCDF conventions applied on a case-by-case basis depending on the product. * Classes defined in this packages are declared as {@link org.apache.sis.storage.netcdf.base.Convention} services. * * @author Alexis Manin (Geomatys) * @author Martin Desruisseaux (Geomatys) */ package org.apache.sis.profile.japan.netcdf;
apache/skywalking-java
1,109
apm-sniffer/apm-agent-core/src/main/java/org/apache/skywalking/apm/agent/core/context/status/OffExceptionCheckStrategy.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.agent.core.context.status; /** * All exceptions would make the span tagged as the error status. */ public class OffExceptionCheckStrategy implements ExceptionCheckStrategy { @Override public boolean isError(final Throwable e) { return true; } }
apache/skywalking-java
1,110
apm-sniffer/optional-plugins/jackson-2.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/jackson/comm/Constants.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.plugin.jackson.comm; import org.apache.skywalking.apm.agent.core.context.tag.AbstractTag; import org.apache.skywalking.apm.agent.core.context.tag.Tags; public class Constants { public static final AbstractTag<String> SPAN_TAG_KEY_LENGTH = Tags.ofKey("length"); }
apache/skywalking-java
1,120
apm-commons/apm-datacarrier/src/main/java/org/apache/skywalking/apm/commons/datacarrier/consumer/IDriver.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.apm.commons.datacarrier.consumer; import org.apache.skywalking.apm.commons.datacarrier.buffer.Channels; /** * The driver of consumer. */ public interface IDriver { boolean isRunning(Channels channels); void close(Channels channels); void begin(Channels channels); }
apache/skywalking
1,123
oap-server/exporter/src/test/java/org/apache/skywalking/oap/server/exporter/provider/grpc/MockLongValueMetrics.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.skywalking.oap.server.exporter.provider.grpc; import org.apache.skywalking.oap.server.core.analysis.metrics.LongValueHolder; public class MockLongValueMetrics extends MockMetrics implements LongValueHolder { @Override public long getValue() { return 1234567891234563312L; } }
apache/skywalking
1,131
oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/query/type/AlarmSnapshot.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.skywalking.oap.server.core.query.type; import java.util.ArrayList; import java.util.List; import lombok.Data; import org.apache.skywalking.oap.server.core.query.mqe.MQEMetric; @Data public class AlarmSnapshot { private String expression; private List<MQEMetric> metrics = new ArrayList<>(); }
apache/stratos
1,126
components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/event/tenant/TenantEvent.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.stratos.messaging.event.tenant; import org.apache.stratos.messaging.event.Event; import java.io.Serializable; /** * Tenant event definition. */ public abstract class TenantEvent extends Event implements Serializable { private static final long serialVersionUID = -214237911335280160L; }
apache/streampipes
1,142
streampipes-storage-api/src/main/java/org/apache/streampipes/storage/api/IDataSinkStorage.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package org.apache.streampipes.storage.api; import org.apache.streampipes.model.graph.DataSinkDescription; import java.util.List; public interface IDataSinkStorage extends CRUDStorage<DataSinkDescription> { DataSinkDescription getFirstDataSinkByAppId(String appId); List<DataSinkDescription> getDataSinksByAppId(String appId); }
apache/struts
1,171
core/src/main/java/org/apache/struts2/action/CspSettingsAware.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.struts2.action; import org.apache.struts2.interceptor.csp.CspSettings; /** * Implement this interface by an action to provide a custom {@link CspSettings}, * see {@link org.apache.struts2.interceptor.csp.CspInterceptor} for more details * * @since Struts 6.2.0 */ public interface CspSettingsAware { CspSettings getCspSettings(); }
apache/syncope
1,135
ext/saml2sp4ui/client-console/src/main/java/org/apache/syncope/client/console/pages/SAML2SPLogout.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.syncope.client.console.pages; import org.apache.wicket.markup.html.WebPage; public class SAML2SPLogout extends WebPage { private static final long serialVersionUID = 4666948447239743855L; public SAML2SPLogout() { super(); setResponsePage(getApplication().getHomePage()); } }
apache/tapestry-5
1,124
tapestry-http/src/main/java/org/apache/tapestry5/http/internal/services/OptimizedSessionPersistedObjectAnalyzer.java
// Copyright 2008, 2011, 2020 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.http.internal.services; import org.apache.tapestry5.http.OptimizedSessionPersistedObject; import org.apache.tapestry5.http.services.SessionPersistedObjectAnalyzer; public class OptimizedSessionPersistedObjectAnalyzer implements SessionPersistedObjectAnalyzer<OptimizedSessionPersistedObject> { public boolean checkAndResetDirtyState(OptimizedSessionPersistedObject sessionPersistedObject) { return sessionPersistedObject.checkAndResetDirtyMarker(); } }
apache/tapestry-5
1,135
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/components/OutputDate.java
// Copyright 2006, 2007 The Apache Software Foundation // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package org.apache.tapestry5.integration.app1.components; import org.apache.tapestry5.MarkupWriter; import org.apache.tapestry5.annotations.Parameter; import java.text.Format; /** * component that formats a value and outputs it. */ public class OutputDate { @Parameter(required = true) private Object value; @Parameter(required = true) private Format format; void beginRender(MarkupWriter writer) { String formatted = format.format(value); writer.write(formatted); } }
apache/tez
1,126
tez-runtime-library/src/main/java/org/apache/tez/runtime/library/cartesianproduct/CartesianProductFilterDescriptor.java
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.tez.runtime.library.cartesianproduct; import org.apache.tez.dag.api.EntityDescriptor; public class CartesianProductFilterDescriptor extends EntityDescriptor<CartesianProductFilterDescriptor> { public CartesianProductFilterDescriptor(String filterClassName) { super(filterClassName); } }
apache/tiles
1,142
tiles-test-pom/tiles-test/src/main/java/org/apache/tiles/test/velocity/ExceptionTool.java
/* * $Id$ * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.tiles.test.velocity; /** * Tool to generate exceptions. * * @version $Rev$ $Date$ */ public class ExceptionTool { /** * Throws an exception. * * @return Nothing. */ public String throwRuntimeException() { throw new RuntimeException("It is an exception!"); } }
apache/tomcat
1,178
java/jakarta/security/auth/message/config/ClientAuthConfig.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package jakarta.security.auth.message.config; import java.util.Map; import javax.security.auth.Subject; import jakarta.security.auth.message.AuthException; public interface ClientAuthConfig extends AuthConfig { ClientAuthContext getAuthContext(String authContextID, Subject clientSubject, Map<String,Object> properties) throws AuthException; }
apache/tomcat80
1,173
java/org/apache/catalina/ha/session/ReplicatedSessionListener.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.catalina.ha.session; import java.io.Serializable; import org.apache.catalina.SessionListener; /** * This is a marker interface used to indicate an implementation of * {@link SessionListener} that should be replicated with the session across the * cluster. */ public interface ReplicatedSessionListener extends SessionListener, Serializable { }
apache/tomee
1,141
examples/simple-stateless-with-descriptor/src/main/java/org/superbiz/calculator/CalculatorLocal.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.calculator; /** * This is an EJB 3 local business interface * This interface is specified using the business-local tag in the deployment descriptor */ //START SNIPPET: code public interface CalculatorLocal { public int sum(int add1, int add2); public int multiply(int mul1, int mul2); } //END SNIPPET: code
apache/tomee
1,152
examples/cdi-request-scope/src/main/java/org/superbiz/cdi/requestscope/Waiter.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.cdi.requestscope; import jakarta.ejb.EJB; import jakarta.ejb.Stateless; import jakarta.inject.Inject; @Stateless public class Waiter { @Inject private Soup soup; @EJB private Chef chef; public String orderSoup(String name) { soup.setName(name); return chef.prepareSoup().getName(); } }
apache/tomee
1,158
examples/ear-testing/business-logic/src/main/java/org/superbiz/logic/Movies.java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.superbiz.logic; import org.superbiz.model.Movie; import java.util.List; /** * @version $Revision: 607077 $ $Date: 2007-12-27 06:55:23 -0800 (Thu, 27 Dec 2007) $ */ public interface Movies { void addMovie(Movie movie) throws Exception; void deleteMovie(Movie movie) throws Exception; List<Movie> getMovies() throws Exception; }
apache/tomee
1,162
container/openejb-core/src/main/java/org/apache/openejb/testing/Application.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.testing; import java.lang.annotation.Retention; import java.lang.annotation.Target; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; @Target({ FIELD, TYPE }) @Retention(RUNTIME) public @interface Application { }
apache/uniffle
1,155
common/src/main/java/org/apache/uniffle/common/exception/RssFetchFailedException.java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.uniffle.common.exception; /** Dedicated exception for rss client's shuffle failed related exception. */ public class RssFetchFailedException extends RssException { public RssFetchFailedException(String message) { super(message); } public RssFetchFailedException(String message, Throwable e) { super(message, e); } }
apache/xmlgraphics-batik
1,148
batik-bridge/src/main/java/org/apache/batik/bridge/DynamicGVTBuilder.java
/* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.apache.batik.bridge; /** * This class is responsible for creating a GVT tree using an SVG DOM tree. * * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a> * @version $Id$ */ public class DynamicGVTBuilder extends GVTBuilder { /** * Constructs a new builder. */ public DynamicGVTBuilder() { } }
apache/zookeeper
1,180
zookeeper-jute/src/main/java/org/apache/jute/Record.java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.jute; import java.io.IOException; import org.apache.yetus.audience.InterfaceAudience; /** * Interface that is implemented by generated classes. */ @InterfaceAudience.Public public interface Record { void serialize(OutputArchive archive, String tag) throws IOException; void deserialize(InputArchive archive, String tag) throws IOException; }
google/auto
1,167
factory/src/test/resources/good/SimpleClassProvidedProviderDeps.java
/* * Copyright 2013 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package tests; import com.google.auto.factory.AutoFactory; import com.google.auto.factory.Provided; import javax.inject.Provider; /** * @author Gregory Kick */ @AutoFactory @SuppressWarnings("unused") final class SimpleClassProvidedProviderDeps { private final Provider<String> providedDepA; private final Provider<String> providedDepB; SimpleClassProvidedProviderDeps( @Provided @AQualifier Provider<String> providedDepA, @Provided @BQualifier Provider<String> providedDepB) { this.providedDepA = providedDepA; this.providedDepB = providedDepB; } }
google/binnavi
1,153
src/main/java/com/google/security/zynamics/binnavi/debug/models/memoryexpressions/_Doc.java
// Copyright 2011-2016 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package com.google.security.zynamics.binnavi.debug.models.memoryexpressions; /** * In the BinNavi GUI it is possible to jump to addresses in the memory window. However, simple * numerical addresses are not convenient enough. The users also want to follow register values * (like eax) or even complex expressions like [4 * eax + ecx]. * * This package contains code that parses string expressions to turn them into expression trees. * These expression trees can then be evaluated once the concrete values for registers or memory * locations are known. */
google/caliper
1,153
caliper-runner/src/main/java/com/google/caliper/runner/worker/trial/TrialNumber.java
/* * Copyright (C) 2013 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.caliper.runner.worker.trial; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; import java.lang.annotation.Retention; import java.lang.annotation.Target; import javax.inject.Qualifier; /** Binding annotation the trial number, used for debugging purposes. */ @Retention(RUNTIME) @Target({FIELD, PARAMETER, METHOD}) @Qualifier public @interface TrialNumber {}
google/closure-compiler
1,146
src/com/google/javascript/jscomp/parsing/parser/trees/AwaitExpressionTree.java
/* * Copyright 2016 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.javascript.jscomp.parsing.parser.trees; import com.google.javascript.jscomp.parsing.parser.util.SourceRange; /** * Represents an {@literal await} expression. * * <pre> * <i>AwaitExpression</i> : <b>await</b> <i>UnaryExpression</i> * </pre> */ public class AwaitExpressionTree extends ParseTree { public final ParseTree expression; public AwaitExpressionTree(SourceRange location, ParseTree expression) { super(ParseTreeType.AWAIT_EXPRESSION, location); this.expression = expression; } }
google/exposure-notifications-android
1,114
app/src/main/java/com/google/android/apps/exposurenotification/common/time/SystemClock.java
/* * Copyright 2020 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ package com.google.android.apps.exposurenotification.common.time; import org.threeten.bp.Instant; import org.threeten.bp.ZonedDateTime; /** * Default implementation of {@link Clock} for use in prod builds, but not in tests. */ class SystemClock implements Clock { @Override public long currentTimeMillis() { return System.currentTimeMillis(); } @Override public Instant now() { return Instant.now(); } @Override public ZonedDateTime zonedNow() { return ZonedDateTime.now(); } }
google/guava
1,142
android/guava-testlib/src/com/google/common/collect/testing/google/TestListMultimapGenerator.java
/* * Copyright (C) 2012 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.common.collect.testing.google; import com.google.common.annotations.GwtCompatible; import com.google.common.collect.ListMultimap; import org.jspecify.annotations.NullMarked; import org.jspecify.annotations.Nullable; /** * A generator for {@code ListMultimap} implementations based on test data. * * @author Louis Wasserman */ @GwtCompatible @NullMarked public interface TestListMultimapGenerator<K extends @Nullable Object, V extends @Nullable Object> extends TestMultimapGenerator<K, V, ListMultimap<K, V>> {}
google/guava
1,174
android/guava/src/com/google/common/reflect/TypeCapture.java
/* * Copyright (C) 2012 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.common.reflect; import static com.google.common.base.Preconditions.checkArgument; import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; /** * Captures the actual type of {@code T}. * * @author Ben Yu */ abstract class TypeCapture<T> { /** Returns the captured type. */ final Type capture() { Type superclass = getClass().getGenericSuperclass(); checkArgument(superclass instanceof ParameterizedType, "%s isn't parameterized", superclass); return ((ParameterizedType) superclass).getActualTypeArguments()[0]; } }
google/guava
1,176
guava/src/com/google/common/util/concurrent/package-info.java
/* * Copyright (C) 2007 The Guava Authors * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ /** * Concurrency utilities. * * <p>Commonly used types include {@link ClosingFuture}, {@link ListenableFuture}, and {@link * Service}. * * <p>Commonly used utilities include {@link Futures}, {@link MoreExecutors}, {@link * ThreadFactoryBuilder}, and {@link Uninterruptibles}. * * <p>This package is a part of the open-source <a href="https://github.com/google/guava">Guava</a> * library. */ @CheckReturnValue @NullMarked package com.google.common.util.concurrent; import com.google.errorprone.annotations.CheckReturnValue; import org.jspecify.annotations.NullMarked;
google/guice
1,146
extensions/assistedinject/src/com/google/inject/assistedinject/AssistedInjectBinding.java
/* * Copyright (C) 2010 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.inject.assistedinject; import com.google.inject.Key; import java.util.Collection; /** * A binding for a factory created by FactoryModuleBuilder. * * @param <T> The fully qualified type of the factory. * @since 3.0 * @author ramakrishna@google.com (Ramakrishna Rajanna) */ public interface AssistedInjectBinding<T> { /** Returns the {@link Key} for the factory binding. */ Key<T> getKey(); /** Returns an {@link AssistedMethod} for each method in the factory. */ Collection<AssistedMethod> getAssistedMethods(); }
google/j2cl
1,131
transpiler/javatests/com/google/j2cl/integration/java/morebridgemethods/TestCase10092.java
/* * Copyright 2017 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package morebridgemethods; import static com.google.j2cl.integration.testing.Asserts.assertTrue; public class TestCase10092 { static interface BI1 { default String get(String value) { return "BI1 get String"; } } abstract static class B implements BI1 {} static class C extends B {} public static void test() { C c = new C(); assertTrue(((B) c).get("").equals("BI1 get String")); assertTrue(c.get("").equals("BI1 get String")); assertTrue(((BI1) c).get("").equals("BI1 get String")); } }
google/java-photoslibrary
1,138
sample/src/main/java/com/google/photos/library/sample/components/AlbumPreviewPanel.java
/* * Copyright 2018 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.photos.library.sample.components; import java.awt.BorderLayout; import javax.swing.JLabel; import javax.swing.JPanel; /** Represents an album preview, which contains the album thumbnail and title. */ public final class AlbumPreviewPanel extends JPanel { private static final int HGAP = 0; private static final int VGAP = 6; public AlbumPreviewPanel(JLabel thumbnail, JLabel title) { setLayout(new BorderLayout(HGAP, VGAP)); add(thumbnail, BorderLayout.CENTER); add(title, BorderLayout.PAGE_END); } }
googleads/googleads-mobile-unity
1,088
source/plugin/Assets/Plugins/Android/GoogleMobileAdsPlugin.androidlib/src/test/java/com/google/unity/ads/UnityAdInspectorTest.java
package com.google.unity.ads; import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.verify; import android.app.Activity; import com.google.android.gms.ads.AdInspectorError; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; import org.robolectric.Robolectric; import org.robolectric.RobolectricTestRunner; /** Tests for {@link UnityAdInspector} */ @RunWith(RobolectricTestRunner.class) public final class UnityAdInspectorTest { @Rule public final MockitoRule mockito = MockitoJUnit.rule(); @Mock private UnityAdInspectorListener mockListener; private Activity activity; @Before public void setUp() { activity = Robolectric.buildActivity(Activity.class).create().get(); } @Test public void openAdInspector_succeeds() throws Exception { UnityAdInspector.openAdInspector(activity, mockListener); verify(mockListener).onAdInspectorClosed(any(AdInspectorError.class)); } }
googleapis/google-cloud-java
1,120
java-chat/proto-google-cloud-chat-v1/src/main/java/com/google/chat/v1/SlashCommandOrBuilder.java
/* * Copyright 2025 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/chat/v1/slash_command.proto // Protobuf Java Version: 3.25.8 package com.google.chat.v1; public interface SlashCommandOrBuilder extends // @@protoc_insertion_point(interface_extends:google.chat.v1.SlashCommand) com.google.protobuf.MessageOrBuilder { /** * * * <pre> * The ID of the slash command. * </pre> * * <code>int64 command_id = 1;</code> * * @return The commandId. */ long getCommandId(); }
googleapis/google-http-java-client
1,120
google-http-client/src/main/java/com/google/api/client/util/ByteCountingOutputStream.java
/* * Copyright (c) 2012 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express * or implied. See the License for the specific language governing permissions and limitations under * the License. */ package com.google.api.client.util; import java.io.IOException; import java.io.OutputStream; /** * Output stream that throws away any content and only retains the count of bytes written to the * stream. * * @author Yaniv Inbar */ final class ByteCountingOutputStream extends OutputStream { /** Number of bytes written. */ long count; @Override public void write(byte[] b, int off, int len) throws IOException { count += len; } @Override public void write(int b) throws IOException { count++; } }
googlearchive/android-audio-high-performance
1,120
aaudio/hello-aaudio/src/main/java/com/google/sample/aaudio/play/PlaybackEngine.java
package com.google.sample.aaudio.play; /* * Copyright 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ public enum PlaybackEngine { INSTANCE; // Load native library static { System.loadLibrary("hello-aaudio"); } // Native methods static native boolean create(); static native void delete(); static native void setToneOn(boolean isToneOn); static native void setAudioDeviceId(int deviceId); static native void setBufferSizeInBursts(int bufferSizeInBursts); static native double getCurrentOutputLatencyMillis(); }
hibernate/hibernate-orm
1,041
documentation/src/main/asciidoc/quickstart/tutorials/entitymanager/src/test/java/org/hibernate/tutorial/em/Event.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.tutorial.em; import java.time.LocalDateTime; import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.Table; @Entity @Table(name = "Events") public class Event { @Id @GeneratedValue private Long id; private String title; @Column(name = "eventDate") private LocalDateTime date; public Event() { // this form used by Hibernate } public Event(String title, LocalDateTime date) { // for application use, to create new events this.title = title; this.date = date; } public Long getId() { return id; } private void setId(Long id) { this.id = id; } public LocalDateTime getDate() { return date; } public void setDate(LocalDateTime date) { this.date = date; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } }
hibernate/hibernate-orm
1,164
hibernate-core/src/main/java/org/hibernate/sql/exec/spi/package-info.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ /** * SPI for execution of SQL statements via JDBC. The statement to execute is * modeled by {@link org.hibernate.sql.exec.spi.JdbcOperation} and is * executed via the corresponding executor - * either {@linkplain org.hibernate.sql.exec.spi.JdbcSelectExecutor} * or {@linkplain org.hibernate.sql.exec.spi.JdbcMutationExecutor}. * <p/> * For operations that return {@link java.sql.ResultSet}s, be sure to see * {@link org.hibernate.sql.results} which provides support for processing results * starting with {@link org.hibernate.sql.results.jdbc.spi.JdbcValuesMapping}. * <p/> * Also provides support for pessimistic locking as part of * {@linkplain org.hibernate.sql.exec.spi.JdbcSelect JDBC select} handling. For details, * see {@linkplain org.hibernate.sql.exec.internal.JdbcSelectWithActions}, * {@linkplain org.hibernate.sql.exec.spi.JdbcSelect#getLoadedValuesCollector()}, * {@linkplain org.hibernate.sql.exec.internal.lock.FollowOnLockingAction} * and friends. */ @Incubating package org.hibernate.sql.exec.spi; import org.hibernate.Incubating;
hibernate/hibernate-reactive
1,101
hibernate-reactive-core/src/main/java/org/hibernate/reactive/sql/results/internal/ReactiveResultsHelper.java
/* Hibernate, Relational Persistence for Idiomatic Java * * SPDX-License-Identifier: Apache-2.0 * Copyright: Red Hat Inc. and Hibernate Authors */ package org.hibernate.reactive.sql.results.internal; import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.reactive.sql.exec.spi.ReactiveValuesResultSet; import org.hibernate.reactive.sql.results.spi.ReactiveRowReader; import org.hibernate.sql.results.jdbc.spi.JdbcValuesMappingResolution; import org.hibernate.sql.results.spi.RowTransformer; /** * @see org.hibernate.sql.results.internal.ResultsHelper */ public class ReactiveResultsHelper { public static <R> ReactiveRowReader<R> createRowReader( SessionFactoryImplementor sessionFactory, RowTransformer<R> rowTransformer, Class<R> transformedResultJavaType, ReactiveValuesResultSet resultSet) { final JdbcValuesMappingResolution jdbcValuesMappingResolution = resultSet .getValuesMapping().resolveAssemblers( sessionFactory ); return new ReactiveStandardRowReader<>( jdbcValuesMappingResolution, rowTransformer, transformedResultJavaType ); } }
hibernate/hibernate-search
1,063
lucene-next/backend/lucene/src/main/java/org/hibernate/search/backend/lucene/work/impl/CountWork.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.backend.lucene.work.impl; import java.io.IOException; import org.hibernate.search.backend.lucene.logging.impl.QueryLog; import org.apache.lucene.search.IndexSearcher; public class CountWork implements ReadWork<Integer> { private final LuceneSearcher<?, ?> searcher; CountWork(LuceneSearcher<?, ?> searcher) { this.searcher = searcher; } @Override public Integer execute(ReadWorkExecutionContext context) { try { IndexSearcher indexSearcher = context.createSearcher(); return searcher.count( indexSearcher ); } catch (IOException e) { throw QueryLog.INSTANCE.ioExceptionOnQueryExecution( searcher.getLuceneQueryForExceptions(), e.getMessage(), context.getEventContext(), e ); } } @Override public String toString() { StringBuilder sb = new StringBuilder( getClass().getSimpleName() ) .append( "[" ) .append( "searcher=" ).append( searcher ) .append( "]" ); return sb.toString(); } }
hibernate/hibernate-search
1,071
integrationtest/v5migrationhelper/orm/src/test/java/org/hibernate/search/test/engine/indexapi/Tree.java
/* * SPDX-License-Identifier: Apache-2.0 * Copyright Red Hat Inc. and Hibernate Authors */ package org.hibernate.search.test.engine.indexapi; import java.util.HashSet; import java.util.Set; import jakarta.persistence.CascadeType; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.Id; import jakarta.persistence.OneToMany; import org.hibernate.search.annotations.Field; import org.hibernate.search.annotations.Indexed; import org.hibernate.search.annotations.IndexedEmbedded; /** * @author Hardy Ferentschik */ @Entity @Indexed public class Tree { @Id @GeneratedValue private long id; @Field private String species; @OneToMany(mappedBy = "tree", cascade = CascadeType.ALL) @IndexedEmbedded private Set<Leaf> leaves; Tree() { } public Tree(String species) { this.species = species; this.leaves = new HashSet<Leaf>(); } public String getSpecies() { return species; } public Set<Leaf> getLeaves() { return leaves; } public void growNewLeave() { leaves.add( new Leaf() ); } }
hibernate/hibernate-tools
1,120
jbt/src/main/java/org/hibernate/tool/orm/jbt/api/wrp/EnvironmentWrapper.java
/* * Hibernate Tools, Tooling for your Hibernate Projects * * Copyright 2024-2025 Red Hat, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.hibernate.tool.orm.jbt.api.wrp; public interface EnvironmentWrapper extends Wrapper { String getTransactionManagerStrategy(); String getDriver(); String getHBM2DDLAuto(); String getDialect(); String getDataSource(); String getConnectionProvider(); String getURL(); String getUser(); String getPass(); String getSessionFactoryName(); String getDefaultCatalog(); String getDefaultSchema(); Class<?> getWrappedClass(); }
openjdk/asmtools
1,193
test/java/org/openjdk/asmtools/lib/package-info.java
/* * Copyright (c) 2023, 2025, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /** * Helper frameworks, utilities, base classes designed to support JUnit testing of ASM tools. */ package org.openjdk.asmtools.lib;
openjdk/jdk8
1,164
langtools/test/tools/javadoc/annotations/annotateMethodsFields/pkg1/B.java
/* * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package pkg1; public class B { @A("f") public int f; @A("m1") public void m1(int i) { } }
openjdk/jdk8
1,171
langtools/test/tools/javac/diags/examples/CannotCreateArrayWithTypeArgs.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.cannot.create.array.with.type.arguments class X { Object[] array = new<Integer> Object[3]; }
openjdk/jdk8
1,178
langtools/test/tools/javac/diags/examples/DiamondRedundantArgs1.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.warn.diamond.redundant.args.1 // options: -XDfindDiamond class Foo<X> { Foo<?> fs = new Foo<String>(); }
openjdk/jdk8
1,181
langtools/test/tools/javac/diags/examples/AssertAsIdentifier.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.warn.assert.as.identifier // options: -source 1.3 -Xlint:-options class AssertAsIdentifier { int assert; }
openjdk/jdk8
1,181
langtools/test/tools/javac/diags/examples/GenericsNotSupported.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.generics.not.supported.in.source // options: -source 1.4 -Xlint:-options class GenericsNotSupported<T> { }
openjdk/jdk8
1,184
langtools/test/tools/javac/diags/examples/WarnForwardRef.java
/* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.warn.forward.ref // options: -XDuseBeforeDeclarationWarning class X { static int x = X.y; static int y; }
openjdk/jdk8
1,187
langtools/test/tools/javac/diags/examples/NotInProfile.java
/* * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ // key: compiler.err.not.in.profile // options: -profile compact1 class NotInProfile { Class<?> c = java.awt.Frame.class; }
openjdk/jtreg
1,204
test/libBuildArgs/lib/mixed/Good.java
/* * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package mixed; import java.io.PrintStream; public class Good { public Good(PrintStream out) { out.println(getClass().getName()); } }